Using xilkernel with C++

Hi, is there a way to get the Xilkernel to run with a C++ application? I didn't find any option for this in the XPS "Software Platform Settings". The problem I'm having is that my thread function ("TSK_Main", which is declared in the C++ application) cannot be called from libxil.a, which is a C library. This is the error message that I'm getting while trying to build the C++ application: ../../ppc405_0_sw_platform/ppc405_0/lib/libxil.a(init.o):(.sdata+0x0): undefined reference to `TSK_Main' Maybe someone knows a workaround for this? Many thanks, Guy.

Reply to
Guy Eschemann
Loading thread data ...

This seems to be a linker problem. The naming conventions for c and c++ object files are different. You can declare C function in C++ with:

extern "C" { ... TSK_Main(...); }

or vice versa

extern "C++" { ... TSK_Main(...); }

Reply to
Markus

Thanks, Markus. It is indeed a linker issue, which was solved using extern "C". Still, I'm wondering if there are any other issues when using xilkernel with C

++? Guy.
Reply to
Guy Eschemann

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.