Problem while including iostream.h in files targetted by ns2.26 make

From: Pradyot Dhulipala (pradyot_s_at_yahoo.com)
Date: 05/12/04


Date: 12 May 2004 06:09:41 -0700

Hi,
I am using ns2.26 with the Makefile using C++ compiler version c++
(GCC) 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk).
When I use iostream.h in a simple program and compile with c++
everything works except I get a deprecated warning.
Using the find command I get the location of iostream.h as
/usr/include/c++/3.2.2/iostream.
Also in my makefile the list of includes are as follows

INCLUDES = \
        -I. \
        -I/home/pradyot/ns-allinone-2.26/tclcl-1.0b13
-I/home/pradyot/ns-allinone-2.26/otcl-1.0a8
-I/home/pradyot/ns-allinone-2.26/include
-I/home/pradyot/ns-allinone-2.26/include -I/usr/include/pcap \
        -I./tcp -I./common -I./link -I./queue \
        -I./adc -I./apps -I./mac -I./mobile -I./trace \
        -I./routing -I./tools -I./classifier -I./mcast \
        -I./diffusion3/lib/main -I./diffusion3/lib \
        -I./diffusion3/lib/nr -I./diffusion3/ns \
        -I./diffusion3/diffusion -I./asim/ -I./qs \
        -I/usr/include/c++/3.2.2 -I/usr/include/c++/3.2.2/backward \
        -I/usr/include/c++/3.2.2/bits

The problem I have is that I can't seem to include iostream.h in my
project files targeted by ns make without getting a whole string of
error messages too lengthy to produce but the gist is as follows.
In file included from /usr/include/c++/3.2.2/string:57,
                 from /usr/include/c++/3.2.2/bits/localefwd.h:49,
                 from /usr/include/c++/3.2.2/ios:48,
                 from /usr/include/c++/3.2.2/ostream:45,
                 from /usr/include/c++/3.2.2/iostream:45,
                 from /usr/include/c++/3.2.2/backward/iostream.h:32,
                 /usr/include/c++/3.2.2/bits/basic_string.tcc: In
member function `_Alloc::size_type std::basic_string<_CharT, _Traits,
_Alloc>::rfind(const _CharT*, _Alloc::size_type, _Alloc::size_type)
const':
/usr/include/c++/3.2.2/bits/basic_string.tcc:712: parse error before
`(' token
In file included from
/usr/include/c++/3.2.2/bits/locale_facets.tcc:43,
                 from /usr/include/c++/3.2.2/locale:46,
                 from /usr/include/c++/3.2.2/bits/ostream.tcc:37,
                 from /usr/include/c++/3.2.2/ostream:275,
                 from /usr/include/c++/3.2.2/iostream:45,
                 from /usr/include/c++/3.2.2/backward/iostream.h:32,
                 /usr/include/c++/3.2.2/limits:942:22: macro "min"
requires 2 arguments, but only 1 given
In file included from
/usr/include/c++/3.2.2/bits/locale_facets.tcc:43,
                 from /usr/include/c++/3.2.2/locale:46,
                 from /usr/include/c++/3.2.2/bits/ostream.tcc:37,
                 from /usr/include/c++/3.2.2/ostream:275,
                 from /usr/include/c++/3.2.2/iostream:45,
                 from /usr/include/c++/3.2.2/backward/iostream.h:32,
                 /usr/include/c++/3.2.2/limits: At global scope:
/usr/include/c++/3.2.2/limits:942: parse error before `throw'
/usr/include/c++/3.2.2/limits:943:22: macro "max" requires 2
arguments, but only 1 given
This is followed by a whole bunch of errors in limits.

If anyone can suggest a soln I would be most grateful.
Thanks,
Pradyot



Relevant Pages

  • Newbie Q: spca5xx webcam driver installation problem
    ... with the included default makefile. ... Building SPCA5XX driver for 2.5/2.6 kernel. ... # Setup the tools ... # Setup compiler warnings ...
    (comp.os.linux.setup)
  • Re: DDK build result different from VS result
    ... > driver project into a VS.NET 2003 makefile project, ... > the DDK compiler, which seem safer and more supproted for kernel development. ... > the compiler flags from the VC project into this new makefile project. ...
    (microsoft.public.development.device.drivers)
  • Re: Cannot start Xserver
    ... # select which makefile to use. ... Kernel compiler version: 4.3.3 ... Detected compiler version: 4.3.4 ... error: #error remap_page_rangeconftest ...
    (Debian-User)
  • Re: Cannot start Xserver
    ... # select which makefile to use. ... Kernel compiler version: 4.3.3 ... Detected compiler version: 4.3.4 ... error: #error remap_page_rangeconftest ...
    (Debian-User)
  • Re: Capturing error line on exception (SWI)
    ... > print_message/2 to catch and print error messages. ... > prevent the compiler from stopping after the first error. ... > an explicitely passed input stream to avoid trouble with directives that ... > may modify the current input stream and do really weird things. ...
    (comp.lang.prolog)