Re: [Plib-users] can't link on OS X
Brought to you by:
sjbaker
From: Kevin W. <wa...@co...> - 2005-05-17 14:22:48
|
Okay, I have looked around on the internet and it seems to be more of a gcc problem than a Mac OS X problem. For some reason, the compiler is trying to process the file (ul.h) as an extern "C" file rather than a c++ file. I can't seem to make XCode stop doing this. On May 15, 2005, at 8:49 PM, Kevin Walchko wrote: > 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 > > > > ------------------------------------------------------- > This SF.Net email is sponsored by Oracle Space Sweepstakes > Want to be the first software developer in space? > Enter now for the Oracle Space Sweepstakes! > http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click > _______________________________________________ > plib-users mailing list > pli...@li... > https://lists.sourceforge.net/lists/listinfo/plib-users > |