Thread: [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 |
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 > |
From: Steve B. <sjb...@ai...> - 2005-05-17 22:35:21
|
Kevin Walchko wrote: > 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. I thought we'd already discussed this - you might want to check the archives. (Possibly the 'plib-devel' archives rather than 'plib-users'). ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |
From: Kevin W. <wa...@co...> - 2005-05-17 22:48:37
|
Yes, there is much discussion, but I did not find a solution -- maybe I missed it. I also have the problem from the command line using make when I try to compile the examples, so it has to do with gcc/make and not XCode (which was my original assumption). On May 17, 2005, at 6:27 PM, Steve Baker wrote: > Kevin Walchko wrote: > >> 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. >> > > I thought we'd already discussed this - you might want to check the > archives. > (Possibly the 'plib-devel' archives rather than 'plib-users'). > > ---------------------------- Steve Baker ------------------------- > HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> > HomePage : http://www.sjbaker.org > Projects : http://plib.sf.net http://tuxaqfh.sf.net > http://tuxkart.sf.net http://prettypoly.sf.net > -----BEGIN GEEK CODE BLOCK----- > GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- > V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ > y++++ > -----END GEEK CODE BLOCK----- > > > ------------------------------------------------------- > 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=7412&alloc_id=16344&op=click > _______________________________________________ > plib-users mailing list > pli...@li... > https://lists.sourceforge.net/lists/listinfo/plib-users > |
From: Kevin W. <wa...@co...> - 2005-05-17 23:22:09
|
Okay, since I mentioned the examples (which currently don't compile for me due to the same reason), when I run configure I get the following warning: checking plib/ul.h presence... yes configure: WARNING: plib/ul.h: present but cannot be compiled configure: WARNING: plib/ul.h: check for missing prerequisite headers? configure: WARNING: plib/ul.h: see the Autoconf documentation configure: WARNING: plib/ul.h: section "Present But Cannot Be Compiled" configure: WARNING: plib/ul.h: proceeding with the preprocessor's result configure: WARNING: plib/ul.h: in the future, the compiler will take precedence configure: WARNING: ## ------------------------------------------ ## configure: WARNING: ## Report this to the AC_PACKAGE_NAME lists. ## configure: WARNING: ## ------------------------------------------ ## checking for plib/ul.h... yes What does this mean? On May 17, 2005, at 4:48 PM, Kevin Walchko wrote: > Yes, there is much discussion, but I did not find a solution -- > maybe I missed it. I also have the problem from the command line > using make when I try to compile the examples, so it has to do with > gcc/make and not XCode (which was my original assumption). > > > On May 17, 2005, at 6:27 PM, Steve Baker wrote: > > >> Kevin Walchko wrote: >> >> >>> 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. >>> >>> >> >> I thought we'd already discussed this - you might want to check >> the archives. >> (Possibly the 'plib-devel' archives rather than 'plib-users'). >> >> ---------------------------- Steve Baker ------------------------- >> HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> >> HomePage : http://www.sjbaker.org >> Projects : http://plib.sf.net http://tuxaqfh.sf.net >> http://tuxkart.sf.net http://prettypoly.sf.net >> -----BEGIN GEEK CODE BLOCK----- >> GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- >> V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r++ >> + y++++ >> -----END GEEK CODE BLOCK----- >> >> >> ------------------------------------------------------- >> 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=7412&alloc_id=16344&op=click >> _______________________________________________ >> plib-users mailing list >> pli...@li... >> https://lists.sourceforge.net/lists/listinfo/plib-users >> >> > > > > ------------------------------------------------------- > 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=7412&alloc_id=16344&op=click > _______________________________________________ > plib-users mailing list > pli...@li... > https://lists.sourceforge.net/lists/listinfo/plib-users > |
From: Kevin W. <wa...@co...> - 2005-05-18 01:17:23
|
I searched through the archives and found the solution -- I some how missed it before. create a soft link in the /usr/include/gcc/darwin/3.3/c++ directory pointing to the /usr/include/plib/-directory. That seems to work like a charm, but it bugs me that I have to do it in the first place! Maybe there is a way to modify the ul.h file or modify the make install command (which I also don't like) to do the soft link automatically. On May 17, 2005, at 5:21 PM, Kevin Walchko wrote: > Okay, since I mentioned the examples (which currently don't > compile for me due to the same reason), when I run configure I get > the following warning: > > checking plib/ul.h presence... yes > configure: WARNING: plib/ul.h: present but cannot be compiled > configure: WARNING: plib/ul.h: check for missing prerequisite > headers? > configure: WARNING: plib/ul.h: see the Autoconf documentation > configure: WARNING: plib/ul.h: section "Present But Cannot Be > Compiled" > configure: WARNING: plib/ul.h: proceeding with the preprocessor's > result > configure: WARNING: plib/ul.h: in the future, the compiler will > take precedence > configure: WARNING: ## > ------------------------------------------ ## > configure: WARNING: ## Report this to the AC_PACKAGE_NAME > lists. ## > configure: WARNING: ## > ------------------------------------------ ## > checking for plib/ul.h... yes > > What does this mean? > > On May 17, 2005, at 4:48 PM, Kevin Walchko wrote: > > >> Yes, there is much discussion, but I did not find a solution -- >> maybe I missed it. I also have the problem from the command line >> using make when I try to compile the examples, so it has to do >> with gcc/make and not XCode (which was my original assumption). >> >> >> On May 17, 2005, at 6:27 PM, Steve Baker wrote: >> >> >> >>> Kevin Walchko wrote: >>> >>> >>> >>>> 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. >>>> >>>> >>>> >>> >>> I thought we'd already discussed this - you might want to check >>> the archives. >>> (Possibly the 'plib-devel' archives rather than 'plib-users'). >>> >>> ---------------------------- Steve Baker ------------------------- >>> HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> >>> HomePage : http://www.sjbaker.org >>> Projects : http://plib.sf.net http://tuxaqfh.sf.net >>> http://tuxkart.sf.net http://prettypoly.sf.net >>> -----BEGIN GEEK CODE BLOCK----- >>> GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- ! >>> O M- >>> V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r++ >>> + y++++ >>> -----END GEEK CODE BLOCK----- >>> >>> >>> ------------------------------------------------------- >>> 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=7412&alloc_id=16344&op=click >>> _______________________________________________ >>> plib-users mailing list >>> pli...@li... >>> https://lists.sourceforge.net/lists/listinfo/plib-users >>> >>> >>> >> >> >> >> ------------------------------------------------------- >> 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=7412&alloc_id=16344&op=click >> _______________________________________________ >> plib-users mailing list >> pli...@li... >> https://lists.sourceforge.net/lists/listinfo/plib-users >> >> > > > > ------------------------------------------------------- > 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=7412&alloc_id=16344&op=click > _______________________________________________ > plib-users mailing list > pli...@li... > https://lists.sourceforge.net/lists/listinfo/plib-users > |