Hello,
i tried to use the STL Vector library in a RTL Module and used the hints
given before to create the following source code for testing it out:
extern "C"
{
#define NULL 0
#define new _new
#include <rtl.h>
#undef new
}
#include <vector.h>
int init_module (void)
{
// nothing (just a compiler test!)
}
void cleanup_module (void)
{
// nothing
}
Trying to compile this very simple module brings up this host of errors
and warnings:
g++ -I/opt/rtl/rtlinux-2.0/linux/include
-I/opt/rtl/rtlinux-2.0/rtl/include -I/opt/rtl/rtlinux-2.0/rtl
-I/opt/rtl/rtlinux-2.0/linux/include -I/opt/rtl/rtlinux-2.0/rtl/include
-I/opt/rtl/rtlinux-2.0/rtl -I/opt/rtl/rtlinux-2.0/rtl/include/posix -Wall
-Wstrict-prototypes -O2 -fomit-frame-pointer -D__RTL__ -D__KERNEL__
-DMODULE -pipe -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2
-malign-functions=2 -DCPU=586 -fno-exceptions -fno-rtti -c test_mod.cpp -o
test_mod.o
In file included from /usr/include/_G_config.h:9,
from /usr/include/g++/stl_config.h:106,
from /usr/include/g++/pair.h:31,
from /usr/include/g++/algobase.h:30,
from /usr/include/g++/vector.h:30,
from test_mod.cpp:8:
/usr/include/bits/types.h:95: warning: `__NFDBITS' redefined
/opt/rtl/rtlinux-2.0/linux/include/linux/posix_types.h:22: warning: this
is the location of the previous definition
/usr/include/bits/types.h:97: warning: `__FDMASK' redefined
/opt/rtl/rtlinux-2.0/linux/include/linux/posix_types.h:34: warning: this
is the location of the previous definition
/opt/rtl/rtlinux-2.0/linux/include/linux/signal.h: In function `void
sigfillset(struct sigset_t *)':
In file included from /opt/rtl/rtlinux-2.0/linux/include/linux/sched.h:23,
from /opt/rtl/rtlinux-2.0/rtl/include/rtl_core.h:9,
from /opt/rtl/rtlinux-2.0/rtl/include/rtl.h:22,
from test_mod.cpp:5:
/opt/rtl/rtlinux-2.0/linux/include/linux/signal.h:159: warning: assignment
of negative value `-1' to `long unsigned int'
/opt/rtl/rtlinux-2.0/linux/include/linux/signal.h:160: warning: assignment
of negative value `-1' to `long unsigned int'
/opt/rtl/rtlinux-2.0/linux/include/linux/signal.h: In function `void
siginitsetinv(struct sigset_t *, long unsigned int)':
/opt/rtl/rtlinux-2.0/linux/include/linux/signal.h:203: warning: assignment
of negative value `-1' to `long unsigned int'
/usr/include/g++/stl_iterator.h: In method
`reverse_bidirectional_iterator<BidirectionalIterator,T,Reference,Distance>::reverse_bidirectional_iterator(BidirectionalIterator)':
In file included from /usr/include/g++/iterator.h:36,
from /usr/include/g++/algobase.h:33,
from /usr/include/g++/vector.h:30,
from test_mod.cpp:8:
/usr/include/g++/stl_iterator.h:445: class
`reverse_bidirectional_iterator<BidirectionalIterator,T,Reference,Distance>'
does not have any field named `get_current'
(this is just the beginning, I ommited the (long) rest)
what am i doing wrong?! (do i have to change some compiler options or s.t.
like that?!)
thanks
tobias klotz
-- [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/