Dennis Schridde schreef:
> 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...
In fact I can give you several:
http://web.mit.edu/answers/c/c_with_plus_plus.html
http://www.objectvalue.com/articles/LinkingCtoCplusplusV02.html
http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html-- Giel
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Warzone-dev mailing list [email protected] https://mail.gna.org/listinfo/warzone-dev
