[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RTEMS + g++ + #include <netinet/in.h>
- Date: Tue, 19 Dec 2000 12:23:46 +0100
- From: corsepiu at faw.uni-ulm.de (Ralf Corsepius)
- Subject: RTEMS + g++ + #include <netinet/in.h>
Chris Johns wrote:
> The simple test program :
> ------ 8< - tst.cpp ------
> #include <sys/types.h>
> #include <netinet/in.h>
> ------ 8< ----------------
> gives :
> $ m68k-rtems-g++ -c -I /opt/rtems/rtems/bare-5200/lib/include tst.cpp
> In file included from tst.cpp:2:
> /opt/rtems/rtems/bare-5200/lib/include/netinet/in.h:282: ANSI C++
> forbids data member `ip_opts' with same name as enclosing class
Try m68k-rtems-g++ -isystem /opt/rtems/rtems/bare-5200/lib/include
m68k-rtems-g++ -B/opt/rtems/rtems/bare-5200/lib/ -c tst.cpp
[Note: This implies using
> So GCC knows a file is included from a system directory. The result is
> <netinet/in.h> compiles on FreeBSD, but fails under RTEMS as we do not
> place <netinet/in.h> in a path which GCC sees as a system directory.
> Looking at the m68k-rtems-gcc I have, the system include is listed as :
> Should the RTEMS install put this file in the correct spot ?
This in fact would be the correct spot for bsp-independent,
target-only dependent header files.
However, RTEMS currently is built per BSP, so a bsp-independent
installation directory can not be used (yet).
Actually, your observation is an indication for yet another hidden
general structural weakness in RTEMS.
Joel, Eric N. and I already have an ongoing discussion on PM on a
I am already working on part of this subject as part of the bsp
split out effort, however I currently do not have much time left for
working on RTEMS (almost none), so progress is very slow.
> solutions welcome.
For now, all RTEMS headers (=RTEMS system headers) have to be
installed to $(prefix)/<BSP>/lib/include.
I.e. -isystem $(prefix)/<BSP>/lib/include or -B$(prefix)/<BSP>/lib/
has to be _prepended_ to the compile command if using gcc.
If using 3rd party compilers, you will probably have a hard time
getting this working at all.
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung
Helmholtzstr. 16, 89081 Ulm, Germany Tel: +49/731/501-8690
mailto:corsepiu at faw.uni-ulm.de FAX: +49/731/501-999