"Undefined Symbols" error in XCode using SDL

Apprentice
Posts: 17
Joined: 2005.08
Post: #1
I found this great set of forums based on my google searches for my current problems with XCode/SDL.

Im creating a pretty basic game but trying hard to lay some solid class based foundations if it were to expand.

On and off I keep getting this "Undefined Symbols:" error in XCode, which can be a real pain to track down since the Location always appears as "Test:0".

Can anyone offer any suggestions on how to actually find what the Undefined symbol is? Where is it being called? How I can avoid this problem in the future?

I've gathered it is something to do with the separate classes not knowing where to link to in the other classes. Can anyone enlighten me further?

Any help would be appreciated. Grin

(Im using Tiger with XCode 2.0)
Quote this message in a reply
Member
Posts: 111
Joined: 2002.06
Post: #2
Two things will help you find the undefined symbol in Xcode.

1. Turn off ZeroLink. Xcode will report an error about the undefined symbols when you try to build the program. The ZeroLink build setting is in the Linking build setting collection.

2. Open the Build Results window by choosing Build > Build Results. You should see four small buttons on the left side of the window. Click the third button to open the build transcript. The build transcript logs everything Xcode did when it built your program, which will help you find the undefined symbol.

Mark Szymczyk
http://www.meandmark.com
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #3
Could this help?
It fixed it for me anyway.
http://www.libsdl.org/faq.php?action=lis...egory=7#55

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Apprentice
Posts: 17
Joined: 2005.08
Post: #4
The Build results window really helped. I was searching high and low for a complete output of the build process. I narrowed it down to a class deconstructor that I must have accidentally deleted and a call to a class method.

I had to comment out the call to the class method because I cant work out yet why I can, using the same object, call a different class method without complaints.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Need help with undefined symbols error with Univeral app running under 10.3.9 dmdmdm 0 2,141 May 29, 2009 01:16 PM
Last Post: dmdmdm
  Error with Linking Symbols Oddity007 1 2,665 Feb 24, 2009 06:20 PM
Last Post: Oddity007
  Need help with undefined symbols error with Univeral app running under 10.3.9 Malarkey 1 3,078 Nov 12, 2006 12:23 PM
Last Post: OneSadCookie
  'Undefined Symbols' problem with Xcode 2.3. Any ideas, please!! scratt 6 5,799 Jun 11, 2006 10:19 AM
Last Post: scratt
  'Unidentified error' error in Xcode scgames 2 3,598 Jun 10, 2006 01:38 AM
Last Post: scgames