H
> 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.
plc.h:
#ifdef __cplusplus
extern "C" {
#endif
...usual header stuff
#ifdef __cplusplus
}
#endif
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
safety.
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]
http://linuxplc.org/mailman/listinfo/linuxplc
> 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.
plc.h:
#ifdef __cplusplus
extern "C" {
#endif
...usual header stuff
#ifdef __cplusplus
}
#endif
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
safety.
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]
http://linuxplc.org/mailman/listinfo/linuxplc