TomorrowPlusX
2004.11.11, 09:37 AM
So, I'm migrating my textures from TGA to PNG, using some of OSC's libPNG sample code. I feel more comfortable with using libPNG since the code is legible and makes sense, whereas Quicktime scares me a little. Before anybody flames me about Quicktime, I've written code for my robotics work which encodes a quicktime moview from OpenGL output. I know Quicktime, enough, and I don't like its design... and I want the core of my game's engine to be as portable as possible.
I couldn't find libPNG in /usr/lib or /usr/local/lib so I built my own ( to libpng.a ) from source with the intent to statically link it to my executable.
Then, I wrote a GLUT testbed to make certain I could use it and it works fine, in the testbed.
But, when I attempted to migrate my game over, I got linker errors which seem to imply a symbol conflict with AppKit.
here's the output:
Ld /Users/zakariya/Projects/Legion/build/Legion.app/Contents/MacOS/Legion
cd /Users/zakariya/Projects/Legion
/usr/bin/g++-3.3 -o /Users/zakariya/Projects/Legion/build/Legion.app/Contents/MacOS/Legion -L/Users/zakariya/Projects/Legion/build -Llib -L/Users/zakariya/Projects/Legion/lib -F/Users/zakariya/Projects/Legion/build -Flib -filelist /Users/zakariya/Projects/Legion/build/Legion.build/Legion.build/Objects-normal/Legion.LinkFileList -framework Cocoa -framework Carbon -framework GLUT -framework OpenGL -lGLEW -lode -lftgl -lfreetype -framework PANSICore -lz -lpng -arch ppc -prebind -Wl,-no_arch_warnings -lmx
ld: multiple definitions of symbol _png_get_uint_31
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit(single module) definition of _png_get_uint_31
lib/libpng.a(pngrutil.o) definition of _png_get_uint_31 in section (__TEXT,__text)
Can anybody tell me what's going on? If AppKit already has a libPNG is there any way to just use its version instead of my own?
I couldn't find libPNG in /usr/lib or /usr/local/lib so I built my own ( to libpng.a ) from source with the intent to statically link it to my executable.
Then, I wrote a GLUT testbed to make certain I could use it and it works fine, in the testbed.
But, when I attempted to migrate my game over, I got linker errors which seem to imply a symbol conflict with AppKit.
here's the output:
Ld /Users/zakariya/Projects/Legion/build/Legion.app/Contents/MacOS/Legion
cd /Users/zakariya/Projects/Legion
/usr/bin/g++-3.3 -o /Users/zakariya/Projects/Legion/build/Legion.app/Contents/MacOS/Legion -L/Users/zakariya/Projects/Legion/build -Llib -L/Users/zakariya/Projects/Legion/lib -F/Users/zakariya/Projects/Legion/build -Flib -filelist /Users/zakariya/Projects/Legion/build/Legion.build/Legion.build/Objects-normal/Legion.LinkFileList -framework Cocoa -framework Carbon -framework GLUT -framework OpenGL -lGLEW -lode -lftgl -lfreetype -framework PANSICore -lz -lpng -arch ppc -prebind -Wl,-no_arch_warnings -lmx
ld: multiple definitions of symbol _png_get_uint_31
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit(single module) definition of _png_get_uint_31
lib/libpng.a(pngrutil.o) definition of _png_get_uint_31 in section (__TEXT,__text)
Can anybody tell me what's going on? If AppKit already has a libPNG is there any way to just use its version instead of my own?