industrialNETworXnetx

KJD

KJD

| 25.08.2008 | 16:57 | 2 replies

Program In C++

Hi!

Can i program the rcx even in C++? A few days ago i tried to define some classes, but i always get build or link errors... If i can program the rcx in C++ what do i have to do? Are there any conversions or key words, which I have attend to?

Thanks for your answers!

Andreas Jacob

Andreas Jacob

Hilscher Gesellschaft fuer Systemautomation mbH

| 25.08.2008 | 17:10

:? mh....normally the netX should be programmed in ANSI C because Hilscher also provides all codes in ANSI C.

You must take care of the header files. You must enter the calling convention like:

#ifdef _cplusplus
extern "C"
{
#endif

#ifdef __cplusplus
}
#endif

Furthermore you have to use the C++ linker and compiler.

Burkhard Ilsen

Burkhard Ilsen

Hilscher GmbH

| 26.08.2008 | 08:53

It is possible but tricky.

AJ wrote:

You must take care of the header files.

And your .ld file has to provide some more areas for c++. Unfortunately I don't know their names right now.

And you might get in trouble with some initialized-but-overwritten data of the c++ libraries because in a debugging session HiTOP won't reset this data.

Login