Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-23-2007, 03:08 PM   #1
LQ Newbie
Registered: Oct 2007
Posts: 2

Rep: Reputation: 0
Unhappy Newbie having problems compiling a C program

Hi- this is my first post. I'd be greateful for any help others can offer.

I've been trying to compile a C program on my Mac (running OS X) but without much success. A colleague had referred me to a similar previous thread and I've tried a few of the suggestions there, bar those for which links were seemingly no longer live, but am still having problems. This is what happens when I try to compile the program as per the instruction manual:

command line: sh ./configure
checking build system type... i386-apple-darwin8.9.1
checking host system type... i386-apple-darwin8.9.1
checking target system type... i386-apple-darwin8.9.1
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets ${MAKE}... no
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH

I then tried downloading gcc-4.2.2 but when I type "find / -name gcc" I eventually got the following:


When I typed "echo $PATH" I got the following:


However, my desired program still won't compile properly.

Sorry about this, but any more suggestions?
Old 10-23-2007, 03:39 PM   #2
Registered: Aug 2007
Distribution: Linux Mint
Posts: 44

Rep: Reputation: 16
Was GCC installed using the OSX package manager? If not I'm wondering how you expect the ./configure script to find it since its not on the path? I don't use OSX but a quick google found which talks about how to install GCC under OSX at /usr/bin/gcc (i.e. on the path).
Old 10-24-2007, 10:30 AM   #3
LQ Newbie
Registered: Oct 2007
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks a million, that seems to have worked!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
problems compiling a fortran program on emacs Vassos Linux - Newbie 2 08-04-2007 06:37 AM
Problems compiling a simple shell program yekrahs Programming 3 09-26-2005 01:07 PM
Problems compiling C program Boba Programming 3 08-28-2004 07:31 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:49 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration