Hmmm it doesn't like some of the :: in the assembler statements.
The probably only working solution is to _not_ include any kernel
headers. The function prototypes you need you will have to put in a
separate header files. The same for defines and constants. this is the
way Pierre did it in LXRT , it isn't pretty because you get duplicated
things but it works, you just have to be very carefull that you keep
things in sync.
- Erwin
crzhang wrote:
>
> Hi, Erwin
> I have followed your instruction:
> #include <rtl_cpp.h>
> extern "C" {
> #define new _new
> #include <mbuff.h>
> #undef new
> }
> but when I compile again, and get the followings:
> g++ -D__KERNEL__ -Wall -Wstrict-prototypes -fno-strict-aliasing -pipe
>-mpreferred-stack-boundary=2 -g -D__RTL__ -DMODULE -D_LOOSE_KERNEL_NAMES
>-I/usr/src/linux/include -I/usr/src/rtl/include -I/usr/src/rtl/include/compat
>-I/usr/src/rtl/include/posix -c -o hello.o hello.cpp
> In file included from /usr/src/linux/include/asm/semaphore.h:31,
> from /usr/src/linux/include/linux/fs.h:181,
> from /usr/src/rtl/include/mbuff.h:24,
> from hello.cpp:5:
> /usr/src/linux/include/asm/system.h: In function `void __set_64bit(long long
>unsigned int *, unsigned int, unsigned int)':
> /usr/src/linux/include/asm/system.h:153: parse error before `::'
> In file included from /usr/src/linux/include/linux/fs.h:181,
> from /usr/src/rtl/include/mbuff.h:24,
> from hello.cpp:5:
> /usr/src/linux/include/asm/semaphore.h: In function `void __up_read(rw_semaphore *)':
> /usr/src/linux/include/asm/semaphore.h:323: parse error before `::'
> /usr/src/linux/include/asm/semaphore.h: In function `void __up_write(rw_semaphore
>*)':
> /usr/src/linux/include/asm/semaphore.h:342: parse error before `::'
> make: *** [hello.o] Error 1
>
> Can you help me?
> Thank you a lot!!!
>
> Wang Heng
> -- [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/rtlinux/
-- [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/rtlinux/