[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] Problems compiling ns-2 2000-12-07 snapshot on win2k



hmm, I think that the way ahead would be this:

typedef std::pair<Nix_t,  Nixl_t> NixPair_t; // Index, bits needed
typedef std::pair<Nix_t*, Nixl_t> NixpPair_t;// NV Pointer, length

that is, add the std::

Cheers,

/ChJ

----- Original Message -----
From: "John Heidemann" <[email protected]>
To: "George Riley" <[email protected]>
Cc: "Christian J�nsson" <[email protected]>; <[email protected]>
Sent: Thursday, December 07, 2000 5:59 PM
Subject: Re: [ns] Problems compiling ns-2 2000-12-07 snapshot on win2k


> >My original implementation used
> >
> >#include <pair.h>
> >
> >instead of the
> >
> >#include <utility>
> >
> >that's there now....
> >The problem seems to be needing a definition of the STL "pair" template,
> >which is in "pair.h", but gets included from the "utility"
> >include in the released version...try changing it to "pair" or "pair.h"
> >on MSVC and see if it fixes the prob (I don't have a windows box handy or
> >would try it myself..)
>
> According to my STL manual <utility> is preferred:
> <http://www.sgi.com/Technology/STL/pair.html>, look at "Definition"
> section.  Too bad MSVC is behind.
>
> Does this patch fix it?
>
>    -John Heidemann
>
>
> Index: nixvec.h
> ===================================================================
> RCS file: /nfs/jade/vint/CVSROOT/ns-2/nix/nixvec.h,v
> retrieving revision 1.1
> retrieving revision 1.2
> diff -u -u -r1.1 -r1.2
> --- nixvec.h    2000/12/01 23:38:36     1.1
> +++ nixvec.h    2000/12/07 17:03:31     1.2
> @@ -25,6 +25,9 @@
>  #define __NIXVEC_H__
>
>  #include <utility>  // for pair
> +#ifdef WIN32
> +#include <pair.h>   // for MSVC 6.0 that doens't have a proper <utility>
> +#endif /* WIN32 */
>
>  // Define a type for the neighbor index
>  typedef unsigned long Nix_t;
>