[Plib-users] can't link on OS X
Brought to you by:
sjbaker
From: Kevin W. <wa...@co...> - 2005-05-16 02:50:09
|
Hi, This is an OS X 10.4 problem, but was hoping someone has figured out how to fix it. When I try to compile code that is linked to ul.h, I get the following errors: Native Build of Target "test" using Build Style "Development" CompileC /gcc/test.build/test.build/Objects-normal/ppc/main.o main.cpp normal ppc c++ com.apple.compilers.gcc.3_3 cd /Users/kevin/other_3d_libs/plib_examples-1.8.4/src/sg/test setenv MACOSX_DEPLOYMENT_TARGET 10.4 /usr/bin/gcc-3.3 -x c++ -arch ppc -pipe -Wno-trigraphs -fpascal- strings -fasm-blocks -g -O0 -Wreturn-type -Wunused-variable -fmessage- length=0 -ffix-and-continue -mtune=G4 -Wp,-header-mapfile,/gcc/ test.build/test.build/test.hmap -F/gcc -I/gcc/include -I/gcc/ test.build/test.build/DerivedSources -c /Users/kevin/other_3d_libs/ plib_examples-1.8.4/src/sg/test/main.cpp -o /gcc/test.build/ test.build/Objects-normal/ppc/main.o In file included from /usr/include/plib/sg.h:29, from /Users/kevin/other_3d_libs/plib_examples-1.8.4/ src/sg/test/main.cpp:45: /usr/include/plib/ul.h: In function `void ulEndianSwap(short unsigned int*)': /usr/include/plib/ul.h:343: error: declaration of C function `void ulEndianSwap(short unsigned int*)' conflicts with /usr/include/plib/ul.h:334: error: previous declaration `void ulEndianSwap(unsigned int*)' here /usr/include/plib/ul.h: In function `void ulEndianSwap(float*)': /usr/include/plib/ul.h:349: error: declaration of C function `void ulEndianSwap(float*)' conflicts with /usr/include/plib/ul.h:343: error: previous declaration `void ulEndianSwap(short unsigned int*)' here /usr/include/plib/ul.h: In function `void ulEndianSwap(unsigned int*)': /usr/include/plib/ul.h:349: error: cannot convert `unsigned int*' to `float*' for argument `1' to `void ulEndianSwap(float*)' /usr/include/plib/ul.h: In function `void ulEndianSwap(int*)': /usr/include/plib/ul.h:350: error: declaration of C function `void ulEndianSwap(int*)' conflicts with /usr/include/plib/ul.h:349: error: previous declaration `void ulEndianSwap(float*)' here /usr/include/plib/ul.h: In function `void ulEndianSwap(short int*)': /usr/include/plib/ul.h:351: error: declaration of C function `void ulEndianSwap(short int*)' conflicts with /usr/include/plib/ul.h:350: error: previous declaration `void ulEndianSwap(int*)' here /usr/include/plib/ul.h: In function `unsigned int ulEndianLittle32 (unsigned int)': For some retarded reason XCode 2.0 wants to treat the header like a C file and not C++. Has anyone figured out how to fix this? Thanks. Kevin |