Re: [Plib-users] link plib into code on mac osx
Brought to you by:
sjbaker
From: Bernhard W. <bw...@ca...> - 2004-10-23 11:57:39
|
Thanks for the immediate reply. > Bernhard Windisch wrote: >> I have written a glut-application and compiled it on Mac OS X NOT >> using the project development tools but the g++ compiler. >> Now, I decided to design the user interface using pui but even just >> including the headerfile without actually using anything from the >> library creates real problems because the (standard) g++-3.3 compiler >> doesn't recognise the plib files as C++ and is therefore not able to >> compile. > > If it isn't able to compile your application with the PLIB headers in > them > then the problem is not how it recognises PLIB's files - but rather a > matter > of what language it thinks the application is written in...header > fines have > to match the language of the file they are included into. > It is completely right that the compiler doesn't recognise the language of pu.h. The problem is that the application IS indeed written in C++ and has been compiled using g++-3.3 without any problems as long as I don't include the header pu.h. > Could you send us the EXACT output from the compiler? Sure, here it is (though only the first few lines because the problem becomes evident and the whole takes up about ten pages... chopin:~/myProgs/MePSim/puiVersion1 bernhardwindisch$ make g++ -g -I/usr/include/gcc/darwin/3.3/c++ -c MePSim.C In file included from /usr/include/plib/sg.h:29, from /usr/include/plib/fnt.h:29, from /usr/include/plib/pu.h:28, from MePSim.C:9: /usr/include/plib/ul.h: In function `void ulEndianSwap(short unsigned int*)': /usr/include/plib/ul.h:336: error: declaration of C function `void ulEndianSwap(short unsigned int*)' conflicts with /usr/include/plib/ul.h:327: error: previous declaration `void ulEndianSwap(unsigned int*)' here /usr/include/plib/ul.h: In function `void ulEndianSwap(float*)': /usr/include/plib/ul.h:342: error: declaration of C function `void ulEndianSwap(float*)' conflicts with /usr/include/plib/ul.h:336: 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:342: 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:343: error: declaration of C function `void ulEndianSwap(int*)' conflicts with /usr/include/plib/ul.h:342: error: previous declaration `void ulEndianSwap(float*)' here /usr/include/plib/ul.h: In function `void ulEndianSwap(short int*)': /usr/include/plib/ul.h:344: error: declaration of C function `void ulEndianSwap(short int*)' conflicts with /usr/include/plib/ul.h:343: error: previous declaration `void ulEndianSwap(int*)' here /usr/include/plib/ul.h: In function `unsigned int ulEndianLittle32(unsigned int)': /usr/include/plib/ul.h:360: error: cannot convert `unsigned int*' to `short int*' for argument `1' to `void ulEndianSwap(short int*)' /usr/include/plib/ul.h: In function `float ulEndianLittleFloat(float)': /usr/include/plib/ul.h:369: error: cannot convert `float*' to `short int*' for argument `1' to `void ulEndianSwap(short int*)' /usr/include/plib/ul.h: In function `void ulEndianLittleArray32(unsigned int*, int)': /usr/include/plib/ul.h:389: error: cannot convert `unsigned int*' to `short int*' for argument `1' to `void ulEndianSwap(short int*)' /usr/include/plib/ul.h: In function `void ulEndianLittleArrayFloat(float*, int) ': /usr/include/plib/ul.h:399: error: cannot convert `float*' to `short int*' for argument `1' to `void ulEndianSwap(short int*)' /usr/include/plib/ul.h: In function `void ulEndianBigArray32(unsigned int*, int)': /usr/include/plib/ul.h:419: error: cannot convert `unsigned int*' to `short int*' for argument `1' to `void ulEndianSwap(short int*)' /usr/include/plib/ul.h: In function `void ulEndianBigArrayFloat(float*, int)': /usr/include/plib/ul.h:429: error: cannot convert `float*' to `short int*' for argument `1' to `void ulEndianSwap(short int*)' /usr/include/plib/ul.h: In function `unsigned int ulEndianBig32(unsigned int)': /usr/include/plib/ul.h:447: error: cannot convert `unsigned int*' to `short int*' for argument `1' to `void ulEndianSwap(short int*)' /usr/include/plib/ul.h: In function `float ulEndianBigFloat(float)': /usr/include/plib/ul.h:456: error: cannot convert `float*' to `short int*' for argument `1' to `void ulEndianSwap(short int*)' In file included from /usr/include/plib/fnt.h:29, from /usr/include/plib/pu.h:28, from MePSim.C:9: /usr/include/plib/sg.h: In function `void sgMakeCoordMat4(float (*)[4], const float*, const float*)': /usr/include/plib/sg.h:149: error: declaration of C function `void sgMakeCoordMat4(float (*)[4], const float*, const float*)' conflicts with /usr/include/plib/sg.h:146: error: previous declaration `void sgMakeCoordMat4(float (*)[4], float, float, float, float, float, float)' here /usr/include/plib/sg.h: In function `void sgMakeCoordMat4(float (*)[4], const float*, const float*)': /usr/include/plib/sg.h:151: error: cannot convert `const float' to `const float*' for argument `2' to `void sgMakeCoordMat4(float (*)[4], const float*, const float*)' /usr/include/plib/sg.h: In function `void sgMakeCoordMat4(float (*)[4], const sgCoord*)': /usr/include/plib/sg.h:155: error: declaration of C function `void sgMakeCoordMat4(float (*)[4], const sgCoord*)' conflicts with /usr/include/plib/sg.h:149: error: previous declaration `void sgMakeCoordMat4(float (*)[4], const float*, const float*)' here /usr/include/plib/sg.h: In function `void sgMakeCoordMat4(float (*)[4], const float*, const float*)': /usr/include/plib/sg.h:156: error: cannot convert `const float*' to `const sgCoord*' for argument `2' to `void sgMakeCoordMat4(float (*)[4], const sgCoord*)' . . . I would be most grateful for any suggestions. Thanks again, Bernhard |