... C++ headers, was Where we are (long)


Thread Starter

Harald Albrecht

> I think what you have to do is put an
> extern "C" { ... };
> around the C declarations. That's because
internally C++ uses some hairy
> Hungarian notation, so you have to tell it
that it's not there.

#ifdef __cplusplus
extern "C" {

...usual header stuff

#ifdef __cplusplus

As to the "Hungarian notation": the C++ name
mangeling is far more powerful than Windows' Hungarian notation, as it does encode the type of all parameters, as well as array size,
constness, etc. So name mangling ensures type

E.02 (two EC cents)

Harald Albrecht
Chair of Process Control Engineering
RWTH Aachen University of Technology
Turmstrasse 46, D-52064 Aachen, Germany
Tel.: +49 241 80-7703, Fax: +49 241 8888-238

LinuxPLC mailing list
[email protected]