While it isn't a good solution, it is a technique for getting going, you
could hack up the header file by hand to include just the statements you
think you want and see if that would allow you to do what you want to do.
If that fails, you have a lot more to worry about than a few compiler
warnings. If it does work, you can then do two things:
1. Continue developing the application you're working on
2. Fight the full-header-file battle
Norm
> -----Original Message-----
> From: Ivan Martinez [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, November 13, 2001 9:28 AM
> To: [EMAIL PROTECTED]; David Olofson
> Subject: Re: [rtl] Still... how can I include unistd.h in C++
> realtime modules?
>
> That doesn't make any difference, I get exactly the same errors :-(
>
> On Monday 12 November 2001 12:59, David Olofson wrote:
> > On Monday 12 November 2001 10:45, Ivan Martinez wrote:
> > > Including rtl_posixio.h in the very first line causes:
> > >
> > > In file included from
> > > /usr/src/rtlinux-3.1/linux/include/linux/wait.h:14, from
> > > /usr/src/rtlinux-3.1/linux/include/linux/fs.h:12, from
> > > /usr/src/rtlinux-3.1/include/rtl_posixio.h:13, from rtmodule.cpp:1:
> > > /usr/src/rtlinux-3.1/linux/include/linux/list.h:35: parse error before
> > > `new' /usr/src/rtlinux-3.1/linux/include/linux/list.h: In function
> > > `void __list_add (...)':
> > > /usr/src/rtlinux-3.1/linux/include/linux/list.h:39: `next' undeclared
> > > (first use this function)
> > > /usr/src/rtlinux-3.1/linux/include/linux/list.h:39: (Each undeclared
> > > identifier is reported only once
> >
> > Ok; those headers aren't written for C++, so you have to tell the
> > compiler explicitly to treat them like C code;
> >
> > extern "C" {
> > #include <various C headers>
> > }
> >
> > That goes for all kernel headers actually. C++ compilers usually
> generate
> > different symbol names for the same code and various other linkage
> > differences, so you'll get either unresolved symbols or nasty bugs if
> you
> > don't tell the compiler what to do.
> >
> >
> > //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]
> -- [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/