Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Mar 19, 2012, 01:05 PM   #1
Alutard
macrumors newbie
 
Join Date: Mar 2012
Can't compile on Mac OSX 10.7

I'm running Mac OSX 10.7, and am using a Mac for the first time. I was a Windows user previously. Anyways, I'm having troubles compiling a C program. I downloaded Xcode and I have it in my $PATH so I can use the gcc compiler. However, when I try compiling my file.c program it gives me this:

ld: library not found for -lcrt1.10.6.o
collect2: ld returned 1 exit status

I don't know what this means or how to fix it

I tried reinstalling Xcode, but that didn't work. This seems so basic, I hope someone out there has an answer.

Thanks!

edit: When I type in gcc -v it tells me the version is 4.2.1. But when I type in 'gcc -o hello.c' I get 'i686-apple-darwin11-llvm-gcc-4.2: no input files'. Shouldn't that also be 4.2.1 instead of 4.2?

Last edited by Alutard; Mar 19, 2012 at 01:10 PM.
Alutard is offline   0 Reply With Quote
Old Mar 20, 2012, 09:39 AM   #2
mfram
macrumors 6502a
 
Join Date: Jan 2010
Show output of the exact command you used and the result. Your example says 'gcc -o hello.c'. That's wrong. It should be 'gcc -o hello hello.c'.
mfram is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Problems with AFP (File Sharing) and Time Machine network Backups on OSX 10.7 Server jyhash Mac OS X Server, Xserve, and Networking 4 Feb 28, 2012 01:23 PM
blocking websites on mac osx 10.6.7 after update ort.ai Mac Basics and Help 0 Apr 21, 2011 10:38 PM
Installing Mac OSX 10.5.3 on Virtualbox on Mac OSX 10.5.3 italiano40 Mac Basics and Help 1 May 30, 2008 06:17 PM


All times are GMT -5. The time now is 07:15 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC