[ECOS] mix use between C++ and C in eCOS. Thanks
QiangHuang
jameshq@liverpool.ac.uk
Fri Apr 25 09:11:00 GMT 2003
Hi all:
I got the a question:
//========================================================
c_file.h
void test_fun(void);
//========================================================
//========================================================
c_file.c
void test_fun(void)
{
//do something here
}
//========================================================
//========================================================
cplusplus_file.hxx
#include <c_file.h>
//========================================================
//========================================================
cplusplus_file.cxx
void myfun(void)
{
// do something here
// call the function defined in the C file
test_fun();
}
//=========================================================
I can build the eCOS library without problem but when I link my application
with the library I got the problem: "undefined reference to test_fun()"
I think this should be a C/C++ linkage problem, but I don't have clue. Can
anybody give me help on this issue? Thanks a lot.
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list