[futurebasic] Re: [FB] OT : Recompiling C code in bash

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : August 2009 : Group Archive : Group : All Groups

From: Deep <Info@...>
Date: Sun, 30 Aug 2009 09:46:57 +0100
Steve,

As Ken rightly said, you need to do the "./configure" and then "make".

After that, you could do "sudo make install" which will perform the next
stage which is to place all the relevant executable files and other required
files into the relevant portions of your MacOS. The "sudo" prefix will cause
it to do it with root authority and you will be asked for your admin
password during the process. If permissions problems still exist, then the
problem is elsewhere, not with the compiling itself, but perhaps with a
source code file, its contents, or the configure file itself?

Obviously, this assumes you have installed the Developer Tools after
installing the Snow Leopard...!

Hope it helps,

Deep


> From: Ken Shmidheiser <kshmidheiser@...>
> Reply-To: <futurebasic@...>
> Date: Sat, 29 Aug 2009 12:12:49 -0400
> To: <futurebasic@...>
> Subject: [FB] OT : Recompiling C code in bash
> 
> Steve wrote:
> 
>> Recompiling C code in bash
> 
> 
> Steve,
> 
> Bash (Bourne Again Shell) is simply a shell for Unix. You don't
> compile code with it, although it is scriptable with a Bash script.
> But you indicate you're trying to compile C source code which has a
> makefile. The makefile contains compilation instructions-- probably
> for the gcc compiler.
> 
> If indeed you have have the C source code in a folder and there is a
> makefile, open your Terminal and at the prompt type cd followed by a
> space and drag the folder containing to the C source to the terminal
> window. It will looking something like this:
> 
>     cd /Users/YourUserName/Desktop/FolderContainingCSource/
> 
> Press Enter and you will be in the directory containing your code. If
> the C source code folder has a "Configure" file in it, in the
> Terminal next enter:
> 
>     ./congfigure
> 
> followed by
> 
>     make
> 
> If there is no Configure file, simply type
> 
>     make
> 
> You should see compilation instructions scrolling down the terminal
> as the C code is compiled.The completed executable will be built in
> the directory where the code resides.
> 
> Conversely you can import the C source and header files into an Xcode
> standard C tool command line project and compile from there.
> 
> If you have trouble, feel free to send the source to me and I'll see
> if I can compile a binary for you.
> 
> Ken
> 
> --
> To unsubscribe, send ANY message to: futurebasic-unsubscribe@...