Linker error: symbol(s) not found
Linker error: symbol(s) not found
- Subject: Linker error: symbol(s) not found
- From: Joachim <email@hidden>
- Date: Wed, 3 Sep 2008 22:40:41 +0200
Dear list,
I'm getting a linker error, and it's not a missing inclusion of a
framework. I suspect it has to do with mixing .m and .mm files, but
I'm actually pretty clueless.
This is the output from the build:
"DGBoardRepFromGame(DGGame*, char*)", referenced from:
-[DGTinyEngine setPositionFromGame:error:] in DGTinyEngine.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
In my otherwise Objective-C only project, DGTinyEngine.mm is using a C+
+ engine, hence the need to make it an Objective-C++ file. It imports
a "DGFunctions.h" file that amongst other general C functions declares
the void DGBoardRepFromGame (DGGame *game, DGBoardRep buffer)
function. The function is implemented in a .m file.
It is the call in DGTinyEngine.mm to this function that causes the
linker error. If I comment out the call to DGBoardRepFromGame, the
project links fine. DGGame is an Objective-C class that is used
several places in DGTinyEngine.mm without causing any problems.
What causes the linker error, and what can I do to avoid it?
Thanks in advance,
Joachim
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden