[ECOS] user defined C++ function in eCOS question? Thanks a lot.
jameshq@liverpool.ac.uk
jameshq@liverpool.ac.uk
Tue Apr 22 16:40:00 GMT 2003
Hi all:
I tried to use C++ function in C but I encounter the following
problem:
(What I trying here is to define some C++ functions(because I need to
access the class object)
and to be called in C, as kapi.cxx, kapi.h)
File: a.h
void create_obj();
File: a.cxx
#include <cyg/io/a.h>
externC void create_obj()
{
int a;
}
while I tried to build the ecos library I got the following error
message:
/ecos-c/ecoscvs/current/src/a.cxx:3: syntax error before `void'
It seems the externC keyword is not recognized here.
what happen here?
BTW what is the difference between externC and extern "C"?
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