Undefined symbols

neuropulse

27-07-2009 07:41:49

When building Ogre on Mac OS X:

Undefined symbols:
"_FT_Load_Char", referenced from:
Ogre::Font::loadResource(Ogre::Resource*) in OgreFont.o
Ogre::Font::loadResource(Ogre::Resource*) in OgreFont.o
"_FT_Done_FreeType", referenced from:
Ogre::Font::loadResource(Ogre::Resource*) in OgreFont.o
"_FT_Init_FreeType", referenced from:
Ogre::Font::loadResource(Ogre::Resource*) in OgreFont.o
"_FT_Set_Char_Size", referenced from:
Ogre::Font::loadResource(Ogre::Resource*) in OgreFont.o
"_FT_New_Memory_Face", referenced from:
Ogre::Font::loadResource(Ogre::Resource*) in OgreFont.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

One of the warnings that precede it:
Ld /Users/Chuck/development/ogre/Mac/Ogre/../build/Ogre.build/Debug/Ogre.build/Objects-normal/ppc/Ogre normal ppc
cd /Users/Chuck/development/ogre/Mac/Ogre
setenv MACOSX_DEPLOYMENT_TARGET 10.5
/Developer/usr/bin/g++-4.0 -arch ppc -dynamiclib -isysroot /Developer/SDKs/MacOSX10.5.sdk -L/Users/Chuck/development/ogre/Mac/Ogre/../build/Debug -L../../Dependencies/lib/Debug -L/Users/Chuck/development/ogre/Mac/Ogre/../../Dependencies/lib/Release -F/Users/Chuck/development/ogre/Mac/Ogre/../build/Debug -filelist /Users/Chuck/development/ogre/Mac/Ogre/../build/Ogre.build/Debug/Ogre.build/Objects-normal/ppc/Ogre.LinkFileList -install_name @executable_path/../Frameworks/Ogre.framework/Versions/A/Ogre -mmacosx-version-min=10.5 -framework Carbon -lFreeImage -lfreetype -lzzip -framework Carbon -framework Cocoa -lz -Wl,-single_module -compatibility_version 1 -current_version 1 -o /Users/Chuck/development/ogre/Mac/Ogre/../build/Ogre.build/Debug/Ogre.build/Objects-normal/ppc/Ogre
ld warning: in /Developer/SDKs/MacOSX10.5.sdk/usr/local/lib/libfreetype.dylib, file is not of required architecture


These errors go away of I check "Build Active Architecture Only" which for me is i386.

I found thread from over a year ago where someone had exactly the same errors. But they were using a ppc. Their errors also went away of they checked "Build Active Architecture Only".

Note that the same things happen with 10.5.sdk
ld warning: in /Developer/SDKs/MacOSX10.5.sdk/usr/local/lib/libfreetype.dylib, file is not of required architecture