Re: [Plib-users] Re: link plib into code on mac osx
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2004-10-29 13:16:10
|
Bernhard Windisch wrote: > This is a follow-up to the problem presented to the list. I managed to > find a work-around to solve the problem that the gcc-compiler didn't > seem to recognise the plib header files as being C++. > > Indeed, the whole problem disappeared by creating a soft link in the > /usr/include/gcc/darwin/3.3/c++ directory pointing to the > /usr/include/plib/-directory. > Could it be the case that the compiler on Mac OS X assumes that the > headers presented in /usr/include/ are C headers? And would it therefore > make sense to create the plib-headers directory when using "make > install" directly in /usr/include/gcc/darwin/3.3/c++ instead of in > /usr/include? That still doesn't make sense. As I said before: >> But think about this - the header file is being "#include"d into the >> source for your application. The compiler doesn"t "recognise the language >> of pu.h" - it takes the ASCII characters inside that file and inserts them >> at that point into your application file. Then the resulting ASCII stream >> is compiled using whatever language the application is written in. The >> compiler doesn"t *see* included files as things to be compiled in their >> own right. I think there is something stranger than this going on. Probably, the compiler puts an automatic 'extern "C" { ... }' around header files that it thinks are lacking that for some reason beyond the compiler writer's control - but gcc/g++ doesn't do this for Windows or Linux - so why would it do that for the Mac? I think we need to understand what's going on a bit better before we start installing PLIB in non-standard (for PLIB) places because if Mac users start relying on the headers being in some bizarre location, they'll write code that's not portable to other OS's and other OS's code won't work for them - and that's not acceptable. ---------------------------- 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----- |