I am getting an Undefined Symbol error at link time in Xcode with no
undefined symbols listed. I don't know what to fix and I don't know
where to start. The detailed compiler/linker window pane spit out
the following but I don't know how to read it. Can anyone spot the
error? Thanx - Jim
----------------------------------------------------------
/Developer/Private/jam -d1 -j1
JAMBASE=/Developer/Makefiles/pbx_jamfiles/ProjectBuilderJambase
JAMFILE=- build ACTION=build _DEFAULT_GCC_VERSION=3.3
BUILD_STYLE=Development "CPP_HEADERMAP_FILE=/Users/jomeara/Desktop/The
Project/Test Code/Concept
test/build/ConceptGL.build/CocoaGL.build/CocoaGL.hmap"
"SRCROOT=/Users/jomeara/Desktop/The Project/Test Code/Concept test"
"OBJROOT=/Users/jomeara/Desktop/The Project/Test Code/Concept
test/build" "SYMROOT=/Users/jomeara/Desktop/The Project/Test
Code/Concept test/build" DSTROOT=/tmp/ConceptGL.dst
jam: warning: no rule for file callbacks.MM
jam: warning: no rule for file cylinder.MM
jam: warning: no rule for file setup.MM
jam: warning: no rule for file profile.MM
jam: warning: no rule for file npath.MM
jam: warning: no rule for file matrix.MM
jam: warning: no rule for file materials.MM
jam: warning: no rule for file lights.MM
jam: warning: no rule for file draw.MM
jam: warning: no rule for file dpoint.MM
PBXCp /Users/jomeara/Desktop/The Project/Test Code/Concept
test/build/CocoaGL.app/Contents/PkgInfo
/Developer/Tools/pbxcp -exclude .DS_Store -exclude CVS
-resolve-src-symlinks "/Users/jomeara/Desktop/The Project/Test
Code/Concept test/build/ConceptGL.build/CocoaGL.build/PkgInfo"
"/Users/jomeara/Desktop/The Project/Test Code/Concept
test/build/CocoaGL.app/Contents"
BuildPhase <CopyResources>CocoaGL.app
CompileCplusplus /Users/jomeara/Desktop/The Project/Test Code/Concept
test/build/ConceptGL.build/CocoaGL.build/Objects-normal/ppc/main.o
/usr/bin/g++-3.3 -c -F"/Users/jomeara/Desktop/The Project/Test
Code/Concept test/build" -I"/Users/jomeara/Desktop/The Project/Test
Code/Concept test/build/include" -arch ppc -fno-common
-fpascal-strings -O0 -Wmost -Wno-four-char-constants
-Wno-unknown-pragmas -pipe "-fmessage-length=0" -mdynamic-no-pic -g
"-Wp,-header-mapfile,/Users/jomeara/Desktop/The Project/Test
Code/Concept test/build/ConceptGL.build/CocoaGL.build/CocoaGL.hmap"
main.mm -o "/Users/jomeara/Desktop/The Project/Test Code/Concept
test/build/ConceptGL.build/CocoaGL.build/Objects-normal/ppc/main.o"
BuildPhase <DeriveAndCompileSources>CocoaGL.app
ClearFileList /Users/jomeara/Desktop/The Project/Test Code/Concept
test/build/ConceptGL.build/CocoaGL.build/Objects-normal/LinkFileList
AppendToFileList /Users/jomeara/Desktop/The Project/Test Code/Concept
test/build/ConceptGL.build/CocoaGL.build/Objects-normal/LinkFileList
StandaloneExecutable /Users/jomeara/Desktop/The Project/Test
Code/Concept test/build/CocoaGL.app/Contents/MacOS/CocoaGL
StandaloneExecutable.LinkUsingFileList /Users/jomeara/Desktop/The
Project/Test Code/Concept
test/build/CocoaGL.app/Contents/MacOS/CocoaGL
/usr/bin/g++-3.3 -o "/Users/jomeara/Desktop/The Project/Test
Code/Concept test/build/CocoaGL.app/Contents/MacOS/CocoaGL"
"-L/Users/jomeara/Desktop/The Project/Test Code/Concept test/build"
"-F/Users/jomeara/Desktop/The Project/Test Code/Concept test/build"
-filelist "/Users/jomeara/Desktop/The Project/Test Code/Concept
test/build/ConceptGL.build/CocoaGL.build/Objects-normal/LinkFileList"
"-arch" "ppc" "-prebind" "-Wl,-no_arch_warnings" "-framework"
"Cocoa" "-framework" "OpenGL" "-framework" "GLUT"
ld: warning prebinding disabled because of undefined symbols
ld: Undefined symbols:
mouseButton(int, int, int, int)
mouseMotion(int, int)
menuCallback(int)
redraw()
gfxInit()
reshape(int, int)
keypress(unsigned char, int, int)
...failed StandaloneExecutable.LinkUsingFileList
/Users/jomeara/Desktop/The Project/Test Code/Concept
test/build/CocoaGL.app/Contents/MacOS/CocoaGL ...
Eric Albert - 25 Sep 2004 23:04 GMT
> I am getting an Undefined Symbol error at link time in Xcode with no
> undefined symbols listed. I don't know what to fix and I don't know
> where to start. The detailed compiler/linker window pane spit out
> the following but I don't know how to read it. Can anyone spot the
> error? Thanx - Jim
> ld: warning prebinding disabled because of undefined symbols
> ld: Undefined symbols:
[quoted text clipped - 5 lines]
> reshape(int, int)
> keypress(unsigned char, int, int)
Something in your project references these functions, but the files that
define those functions aren't in your project. Either remove your calls
to them or find the files that define the functions and add them to your
project.
Hope this helps,
Eric

Signature
Eric Albert ejalbert@cs.stanford.edu
http://outofcheese.org/
Jim Schimpf - 26 Sep 2004 02:49 GMT
> I am getting an Undefined Symbol error at link time in Xcode with no
> undefined symbols listed. I don't know what to fix and I don't know
[quoted text clipped - 80 lines]
> /Users/jomeara/Desktop/The Project/Test Code/Concept
> test/build/CocoaGL.app/Contents/MacOS/CocoaGL ...
Not sure, but you are trying to use Open GL, I checked on a project
that worked and I had the following frameworks:
ApplicationServices.framework
Cocoa.framework
CoreFoundation.framework
IOKit.framework
OpenGL.framework
AppKit.framework
Foundation.framework
It looks like you are missing these items from a framework that is
not included.
(Just my guess)
--jim
Eric Albert - 26 Sep 2004 18:36 GMT
> > /usr/bin/g++-3.3 -o "/Users/jomeara/Desktop/The Project/Test
> > Code/Concept test/build/CocoaGL.app/Contents/MacOS/CocoaGL"
[quoted text clipped - 30 lines]
> It looks like you are missing these items from a framework that is
> not included.
He's including the Cocoa and OpenGL frameworks. Cocoa implicitly
includes all of the ones you listed except IOKit and OpenGL and IOKit
doesn't include the functions referenced above, so this isn't the
problem.
-Eric

Signature
Eric Albert ejalbert@cs.stanford.edu
http://outofcheese.org/
M. Uli Kusterer - 26 Sep 2004 14:29 GMT
> I am getting an Undefined Symbol error at link time in Xcode with no
> undefined symbols listed. I don't know what to fix and I don't know
[quoted text clipped - 15 lines]
> /Users/jomeara/Desktop/The Project/Test Code/Concept
> test/build/CocoaGL.app/Contents/MacOS/CocoaGL ...
Don't trust the regular "build warnings and errors" list. It simply says
"Undefined Symbols:". However, if you look in the raw text output in
that window (which you pasted into your e-mail) instead of the pretty
list with the icons, you'll see that the symbols are listed there.
The nice list and the text output may occasionally differ. File a bug
against it at <http://bugreport.apple.com>. I did, and if enough people
do, they may finally fix it.
Cheers,
-- Uli
http://www.zathras.de
jimcath - 26 Sep 2004 19:09 GMT
> I am getting an Undefined Symbol error at link time in Xcode with no
> undefined symbols listed. I don't know what to fix and I don't know
> where to start. The detailed compiler/linker window pane spit out
> the following but I don't know how to read it. Can anyone spot the
> error? Thanx - Jim
> ----------------------------------------------------------
Little did I know that Xcode file extensions were case sensitive. The .mm file
extension needed to be lowercase. Thank y'all for your help.
Thomas Engelmeier - 29 Sep 2004 17:42 GMT
> ld: Undefined symbols:
> mouseButton(int, int, int, int)
[quoted text clipped - 4 lines]
> reshape(int, int)
> keypress(unsigned char, int, int)
Those are GLUT routines. You need to add the appropriate version of the
GLUT library (or framework, if available) to your project.
HTH,
Tom_E

Signature
This address is valid in its unmodified form but expires soon.