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 May 17, 2012, 10:15 AM   #1
suphi
macrumors newbie
 
Join Date: May 2012
GCC Error using Terminal

Hi,

I have a similar problem i think. Can anyone help me please?
I am using Xcode Version 4.3.2

I just tried to compile with gcc command my backgammon game on terminal. Here is the error message:

Undefined symbols for architecture x86_64:
"_InitBoard", referenced from:
_main in ccN5bK2w.o
"_DrawBoard", referenced from:
_main in ccN5bK2w.o
"_decideWhoStarts", referenced from:
_main in ccN5bK2w.o
"_RollDices", referenced from:
_main in ccN5bK2w.o
"_combinationOfPlayableSquaresWithDices", referenced from:
_main in ccN5bK2w.o
"_makeMove", referenced from:
_main in ccN5bK2w.o
"_isThereAnyWinner", referenced from:
_main in ccN5bK2w.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
suphi is offline   0 Reply With Quote
Old May 17, 2012, 10:25 AM   #2
chown33
macrumors 603
 
Join Date: Aug 2009
Post the exact Terminal command you used to compile your program.

Also, identify the exact .c files that make up your program. For example if there's a "main.c" and a "back.c", then say that. If there's only one .c file, say that.
chown33 is offline   0 Reply With Quote
Old May 17, 2012, 10:59 AM   #3
suphi
Thread Starter
macrumors newbie
 
Join Date: May 2012
Quote:
Originally Posted by chown33 View Post
Post the exact Terminal command you used to compile your program.

Also, identify the exact .c files that make up your program. For example if there's a "main.c" and a "back.c", then say that. If there's only one .c file, say that.
command: gcc main.c -o back
And i have 4 .c files. main.c, ai.c, play.c, debut.c.


Ah ok That was the problem. Thank u for remembering that.
it works with: gcc main.c ai.c play.c debut.c -o back
suphi 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

Similar Threads
thread Thread Starter Forum Replies Last Post
Error 1 operation not permitted, terminal not working SuperHero87 OS X 4 May 20, 2014 02:04 AM
General: FIX "Error opening terminal: xterm-256color" for Terminal Commands (e.g., "top") iOS7 thelatinist Jailbreaks and iOS Hacks 9 Jan 10, 2014 07:46 PM
Terminal command error Ddyracer OS X 10.8 Mountain Lion 7 Aug 27, 2013 09:51 AM
Terminal Error Message Adamhumbug Mac Applications and Mac App Store 1 Jan 10, 2013 09:28 PM
Error on terminal when trying to run application, help? bigben33 OS X 10.8 Mountain Lion 2 Oct 20, 2012 11:06 PM

Forum Jump

All times are GMT -5. The time now is 04:31 PM.

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

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