Am Montag, 8. Januar 2007 21:08 schrieb Giel van Schijndel: > Dennis Schridde schreef: [...] > >> What I don't agree with is making a C interface to a C++ interface to > >> OpenAL - seems like duplicated work to me. I'd just use C++ in the code > >> and compile the complete game with a C++ compiler. But that's just me, I > >> guess there needs to be some decision about how to use C++, or we just > >> follow the usual "those who do decide" approach. > > > > Basically I think that's the maintainance problem... > > Actually I didn't even know that it is possible to link a C application > > against a C++ lib, because I thought the C++ ABI is incompatible to the C > > ABI... > > In fact OpenAL itself is written largely in C++. They simply wrapped its > interface (or more accurately the include files with function > declarations) in an extern "C" {...} declaration to make sure the > compiler generates C-style symbols which can then be resolved by the > linker when linking with C-code. Aha, didn't know that... Can someone explain that in more detail or provide a link? I'd like to know how that works, that a C app can link against a C++ lib using a wrapper interface...
--Dennis
pgpxEZhUacVeQ.pgp
Description: PGP signature
_______________________________________________ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev