I’m trying to build for mac os x using gcc 3.2 and having linker problems. I am getting redefinition errors from the Carbon framework. There were no warnings or errors in creation of the .o files.
g++ -W -g -F../Library/Frameworks -framework SDL -framework SDL_image -framework OpenGL -L../Desktop/fmodapi362mac.1/api/lib -o test test.o mixer.o log.o video.o thing.o vectMath.o BmpLoader.o consoleCommands.o globals.o Planet.o internal.o DT_drawtext.o CON_console.o CON_consolecommands.o ThingContainer.o -lfmod
ld: ../Desktop/fmodapi362mac.1/api/lib/libfmod.a(output_mac.c.o) illegal reference to symbol: _BitClr defined in indirectly referenced dynamic library /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
ld: ../Desktop/fmodapi362mac.1/api/lib/libfmod.a(output_mac.c.o) illegal reference to symbol: _NewSICompletionUPP defined in indirectly referenced dynamic library /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound
ld: /usr/lib/crt1.o illegal reference to symbol: __objcInit defined in indirectly referenced dynamic library /usr/lib/libobjc.A.dylib
ld: ../Desktop/fmodapi362mac.1/api/lib/libfmod.a(output_mac_carbonsndplaydb.c.o) illegal reference to symbol: _OTAtomicSetBit defined in indirectly referenced dynamic library /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
I tried the ranlib program and installed the latest fmod but saw no changes in the linker output.
Any ideas? Is there a linker flag I’m not setting? Thanks, Andy
- aespen asked 14 years ago
nevermind – sorry, these are caused by SDL and my lack of understanding of building Mac OS X applications with gnu tools. I need to hack through the SDL before getting back to fmod. Will repost if I have something more specific at that point.
I am trying to get fmod code to compile under Mac OS X 10.2.1 with gcc 3.2. I’ve resolved my SDL problems and I’m almost there with fmod. I am using libfmod.a dated May 21 13:42. This is the error I see now from the linker:
ld: ../Desktop/api/lib/libfmod.a(output_mac.c.o) illegal reference to symbol: _SndDisposeChannel defined in indirectly referenced dynamic library /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound
The linker is called as follows:
g++ -Wall -g -L../Desktop/api/lib -F../Library/Frameworks -framework SDL -framework SDL_image -framework OpenGL -framework Cocoa -o <bunch of .o files> -lfmod -lobjc
Anyone see anything obvious?
-framework Carbon did the trick. Thanks. We now have the same OpenGL/SDL/fmod code running on mac/linux/windoze. pretty cool. One thing I did notice is that I had to set the freq at 44100 for the ibook I’m working on for fmod to initialize. I haven’t played around any further yet with this.
Please login first to submit.