Anybody help me with this, or you won't have a brand new DSLib v1.3.0 
supporting C++
;-)

On Monday 05 November 2001 11:17, Ivan Martinez wrote:
> Thank you,
>       I need this to add C++ support to my Dynamic Systems Library
> (dslib.sf.net). It wouldn't be nice to ask users to modify RTLinux' header
> files, and I prefer not to complicate things by making the library generate
> aditional header files.
>       So, is there a way of including "unistd.h" in the realtime module?. Using
> the following doesn't seem to make any difference:
> extern "C" {
> #incude <unistd.h>
> }
>       Regards,
>       Ivan
>
> On Friday 02 November 2001 08:42, David Hamilton wrote:
> > Ivan,
> > The rtl headers should but don't have
> > #ifdef __cplusplus
> > extern "C"
> > #endif
> > at the top.
> > Therefore you have to make the extern "C" declaration yourself.
> > I just use the example header (from examples/cpp) rtl_cpp.h and added
> > #define <unistd.h>
> > to it.
> > Note: I moved the new and delete functions to another header
> > (rtl_cpp_fun.h) so I could include rtl_cpp.h in multiple .cpp files, and
> > include
> > rtl_cpp_fun.h in just one (to avoid multiple copies of the function being
> > linked together).
> > David
> >
> > -----Original Message-----
> > From: Ivan Martinez [mailto:[EMAIL PROTECTED]]
> > Sent: 01 November 2001 15:19
> > To: RTLinux mailing list
> > Subject: [rtl] Can't use unistd.h in C++ realtime modules?
> >
> >
> >     Hello all,
> >     The first line of my C++ realtime module is:
> >
> > #include <unistd.h>
> >
> >     Which produces the following compilation errors:
> >
> > 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 /usr/src/rtlinux-3.1/include/posix/unistd.h:17,
> >                  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
> > for each function it appears in.)
> > /usr/src/rtlinux-3.1/linux/include/linux/list.h:39: parse error before
> > `;' /usr/src/rtlinux-3.1/linux/include/linux/list.h:42: `prev' undeclared
> > (first
> >
> > use this function)
> > ...
> >
> >     I use the attached Makefile. Do you know what's wrong?.
> >     BTW, I don't really know which C and C++ libraries I can link in
> > realtime
> > modules, could anybody tell me where to find info about that?.
> >     Thank you,
> >     Ivan Martinez
> > -- [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/

Reply via email to