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.
Using xilkernel with C++
Mar 20, 2007
2 Replies
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(...); }
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.Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required