• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Linker error: symbol(s) not found
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Linker error: symbol(s) not found
      • From: "Julien Jalon" <email@hidden>
  • Prev by Date: Setting color of NSPopupButtons
  • Next by Date: Re: View animator, how to do explicit animations / animation groups?
  • Previous by thread: Re: Setting color of NSPopupButtons
  • Next by thread: Re: Linker error: symbol(s) not found
  • Index(es):
    • Date
    • Thread