Hi all,
I am trying to port (test) a small C++ app, which uses sockets, to the L4 environment. Most of the FLIPS examples uses the mode=l4env_base which includes dietlibc paths. I've tried to compile the app against libstdc++ and dietlibc but they do not seem compatible.
The C++ app successfully compiles when using l4env_freebsd, but as soon as I include the Linux24/include directory to get the socket headers then there is a lot of clashes (duplicate defines) with the Oskit. This is obviously the reason for dietlibc in FLIPS, but the problem then is that dietlibc is not C++ compatible.
With "compatible" I mean that some of the functions (like putc) is defined and not declared in the stdio.h file of dietlibc, which is then actually undefined in the cstdio file when the functions are moved to the STD namespace.
Q1: Is this true - any suggestions?
Thanks Leon
On Wednesday 22 September 2004 12:57, Leon wrote:
I've tried to compile the app against libstdc++ and dietlibc but they do not seem compatible.
Unfortunately, the libstdc++ library is linked against the Oskit10 and IMHO it would need a huge amount of work to get it link against the dietlibc. This is one point at our TODO list but there are others ...
The C++ app successfully compiles when using l4env_freebsd, but as soon as I include the Linux24/include directory to get the socket headers then there is a lot of clashes (duplicate defines) with the Oskit. This is obviously the reason for dietlibc in FLIPS, but the problem then is that dietlibc is not C++ compatible.
Do you _really_ need exceptions and rtti? If not, try to compile your program with -fno-rtti -fno-exceptions and don't link your binary against libstdc++.
Frank
Frank,
I am a bit confused...
Unfortunately, the libstdc++ library is linked against the Oskit10 and IMHO it would need a huge amount of work to get it link against the dietlibc...<snip>... ...<snip>...and don't link your binary against libstdc++.
Q1: So, at present, socket related code should only be written in C and NOT C++?
Thanks Leon
l4-hackers@os.inf.tu-dresden.de