[ns] Re: known compile error in ns-2.27
Arne Lie
arne.lie at item.ntnu.no
Wed Nov 3 14:46:55 PST 2004
Hi,
I have just found a manual solution that works for me. I searched the ns-2
archive at www.isi.edu/nsnam/htdig/search.html (thanks to Victor Gonçalves
Alves) and found pointers to http://nrlsensorsim.pf.itd.nrl.navy.mil/ and
the patch file
http://nrlsensorsim.pf.itd.nrl.navy.mil/nrlsensorsim-2.27.tgz. Well, I
downloaded and read the documentation. It said that the patch had to be
applied on a clean system where ./install had not been activated yet.
Well, my system has been used some while, so... OK, so I looked carefully
through the patchfile to see what it would do to the Makefiles of
interest. Then I saw that it suggested to add
-DCPP_NAMESPACE=std
instead of the already suggested at ns-2 error page
-DCPP_NAMEspace=@CPP_NAMESPACE@
in the Makefile.in files. OK, so I tried, but still I saw the same error
message. Since I do not know how the main Makefile is using the
Makefile.in file, I tried a final crude solution: to edit the Makefiles
directly. And, now it will compile! I just hope that the compilation is
fine, I do not know what these last programs are doing. So, the solution
is
In ./indep-utils/cmu-scen-gen/setdest/Makefile, modify the DEFINE to
DEFINE = -Dstand_alone -DSTL_NAMESPACE=@STL_NAMESPACE@ -DCPP_NAMESPACE=std
In ./indep-utils/webtrace-conv/nlanr/Makefile, modify the CFLAGS to
CFLAGS = -DSTL_NAMESPACE=@STL_NAMESPACE@ -DCPP_NAMESPACE=std
In ./indep-utils/webtrace-conv/dec/Makefile, modify the CFLAGS to
CFLAGS = -DSTL_NAMESPACE=@STL_NAMESPACE@ -DCPP_NAMESPACE=std
best regards
Arne
On Wed, November 3, 2004 8:29 pm, Barry Gleeson said:
> in relation to your problem ive the same problem and have seen a few
> posts.
> my ns seems to give me this error but still seems to work so maybe the
> best
> thing is to ignore these errors, its still a bit annoying however
>
> like u ive tried everything to solve it to no avail.
> if u find a solution please let me know.
>
> rgds
> Barry
>
>
>
> Hi,
>
> I'm using latest cygwin and ns-2.27. I read on the ns error page that my
> problem is known, but the bug-fix provided there does not help. After the
> ns.exe is linked, I get several error messages, but they are all related
> to namespaces. Here is the first:
>
> for i in indep-utils/cmu-scen-gen/setdest indep-utils/webtrace-conv/dec
> indep-utils/webtrace-conv/epa indep-utils/webtrace-conv/nlanr
> indep-utils/webtrace-conv/ucb; do ( cd $i; make all; ) done
> make[1]: Entering directory
> `/home/Arne/ns-allinone-2.27/ns-2.27/indep-utils/cmu-scen-gen/setdest'
> g++ -c -Dstand_alone -DSTL_NAMESPACE=@STL_NAMESPACE@ -o setdest.o
> setdest.cc
> In file included from ../../../config.h:54,
> from setdest.h:5,
> from setdest.cc:57:
> ../../../autoconf.h:86: error: namespace `CPP_NAMESPACE' undeclared
> make[1]: *** [setdest.o] Error 1
> make[1]: Leaving directory
> `/home/Arne/ns-allinone-2.27/ns-2.27/indep-utils/cmu-scen-gen/setdest'
>
> So, I have tried the patch, but it does not fit. I have tried manual
> changing the related Makefile.in files, but it does no good. I have tried
> to change the configure file to force the cpp compiler not to requre
> namespaces by #define CPP_REQUIRES_NAMESPACE 0, but it does not help.
>
> I do not know any good way of searching this mail list, I am sure this
> problem has been rised earlier, so I apologise. Also, I am not a "make"
> expert, so I do not know the relationship between Makefile and
> Makefile.in. I hope somebody still can provide me with information to
> solve this problem.
>
> Arne
>
>
> ------------------------------------------------------------------------
> Previous message:
>
More information about the Ns-users
mailing list