Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
gcc?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Stemcell" data-source="post: 1136528" data-attributes="member: 178170"><p>Hi, all</p><p>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:</p><p></p><p>Undefined symbols:</p><p> "_roll", referenced from:</p><p> _main in ccxz2NP4.o</p><p> _main in ccxz2NP4.o</p><p> ld: symbol(s) not found</p><p> collect2: ld returned 1 exit status</p><p></p><p>Please help! Thanks for reading.</p></blockquote><p></p>
[QUOTE="Stemcell, post: 1136528, member: 178170"] 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]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
gcc?
Top