Thread: gcc?
View Single Post

Member Since: Nov 07, 2010
Posts: 3
Stemcell is on a distinguished road

Stemcell is offline
Hi, all
I am currently attempting to successfully compile a C program for which I created external definitions of the functions and headerfiles for their prototypes. I was instructed on the steps by my graduate student instructor for a linux system. When all files necessary for complete compiling are present in the same folder, the terminal command 'make' does the trick! However in Terminal running within Snowleopard, 'gcc main.c' produces an 'undefined symbols' error. In an attempt to shed light on the point of the error, I transferred the functions of a lab I previously successfully created from the main.c file to their own .c and .h files. Upon commanding Terminal to compile, I received a familiar 'undefined symbols' error-in other words, the same basic error. Here's the error:

Undefined symbols:
"_roll", referenced from:
_main in ccxz2NP4.o
_main in ccxz2NP4.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Please help! Thanks for reading.
QUOTE Thanks