Are you using rtl.mk? If so, I think it defines CC as cc (at least in v3) which I would guess spcifies a c compiler, not g++. Wayne
David Hamilton wrote: > > Thanks for the reply David. > However, I still have a problem. > > I tried compiling your examples/cpp program and it fails with the message... > ...linux/inlude/asm/system.h:153: parse error before '::' > > David > > -----Original Message----- > From: David Olofson [mailto:[EMAIL PROTECTED]] > Sent: 10 October 2001 19:26 > To: [EMAIL PROTECTED] > Subject: Re: [rtl] C++ compiling problem > > On Wednesday 10 October 2001 19:22, David Hamilton wrote: > > I tried writing some simple apps in C++, and the compiler produces > > errors. This can be re-produced by simply renaming the hello.c example > > hello.cpp and trying to compile. > > There is something about conflict between C and C++ linkage in linux > > kernel headers. > > Anybody got any ideas. > > Is there a general problem developing RTLinux apps in C++ !??? > > You must tell the compiler that the kernel headers are written in C by > putting 'extern "C" {...}' around the #include directives. (Or the C++ > compiler will assume that the function prototypes are to be interpreted > as C++, which results in different symbol names and possibly even > different calling conventions.) > > //David Olofson --- Programmer, Reologica Instruments AB > > .- M A I A -------------------------------------------------. > | Multimedia Application Integration Architecture | > | A Free/Open Source Plugin API for Professional Multimedia | > `----------------------------> http://www.linuxdj.com/maia -' > .- David Olofson -------------------------------------------. > | Audio Hacker - Open Source Advocate - Singer - Songwriter | > `-------------------------------------> http://olofson.net -' > -- [rtl] --- > To unsubscribe: > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR > echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED] > -- > For more information on Real-Time Linux see: > http://www.rtlinux.org/ > -- [rtl] --- > To unsubscribe: > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR > echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED] > -- > For more information on Real-Time Linux see: > http://www.rtlinux.org/ -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED] -- For more information on Real-Time Linux see: http://www.rtlinux.org/
