new user of ns3

167 views
Skip to first unread message

amelie...@gmail.com

unread,
Mar 21, 2014, 4:55:10 AM3/21/14
to ns-3-...@googlegroups.com
Hi , I'm new in ns3 programming,
when i build mesh.cc in
eclipse3.7.2,there are two problem.
1.could not get .pcap file
2.could not resolve "CLOCKS_PER_SEC" even i include "time.h"

could you help me resolving these problem?
thanks a lot!
mesh.cc

Konstantinos

unread,
Mar 21, 2014, 7:00:42 AM3/21/14
to ns-3-...@googlegroups.com
Have you configured Eclipse properly?
http://www.nsnam.org/wiki/HOWTO_configure_Eclipse_with_ns-3

If you run any other scenario (e.g. the tutorials), do they run?

amelie...@gmail.com

unread,
Mar 21, 2014, 9:57:07 PM3/21/14
to ns-3-...@googlegroups.com
yes,other examples(e.g.first.cc) is successful.and if i exchange CLOCKS_PER_SEC for a numble(e.g.1000),the result is
Waf: Entering directory `/home/amelie/eclipsell/ns3/build'
Waf: Leaving directory `/home/amelie/eclipsell/ns3/build'
'build' finished successfully (1.969s)
Printing mesh point device #0 diagnostics to mp-report-0.xml
Printing mesh point device #1 diagnostics to mp-report-1.xml
Printing mesh point device #2 diagnostics to mp-report-2.xml
Printing mesh point device #3 diagnostics to mp-report-3.xml
Printing mesh point device #4 diagnostics to mp-report-4.xml
Printing mesh point device #5 diagnostics to mp-report-5.xml
Printing mesh point device #6 diagnostics to mp-report-6.xml
Printing mesh point device #7 diagnostics to mp-report-7.xml
Printing mesh point device #8 diagnostics to mp-report-8.xml

在 2014年3月21日星期五UTC+8下午7时00分42秒,Konstantinos写道:

Tommaso Pecorella

unread,
Mar 22, 2014, 2:36:23 AM3/22/14
to ns-3-...@googlegroups.com
Hi,

This is not an Eclipse issue. This is a compiler issue.
We need to know the OS you're using. And the compiler version (terminal, "gcc --version".

CLOCKS_PER_SEC is a macro defined in <ctime> (http://www.cplusplus.com/reference/ctime/CLOCKS_PER_SEC/).
As a consequence, it must be found.

T.

amelie...@gmail.com

unread,
Mar 22, 2014, 3:24:43 AM3/22/14
to ns-3-...@googlegroups.com

The os is ubuntu 12.04,and the gcc 4:4.6.3-1ubuntu5.
在 2014年3月22日星期六UTC+8下午2时36分23秒,Tommaso Pecorella写道:

Tommaso Pecorella

unread,
Mar 22, 2014, 3:40:49 AM3/22/14
to ns-3-...@googlegroups.com
Hi,

very strange. If you build ns-3 from command line you get errors ?
Moreover, what ns-3 version are you using? (sorry, forgot to ask before).

T

amelie...@gmail.com

unread,
Mar 22, 2014, 4:55:28 AM3/22/14
to ns-3-...@googlegroups.com
Hi,
i use ns-3.19.
when i build ns-3 from command line ,the result is
amelie@amelie-Lenovo-V560:~/download/ns-allinone-3.19/ns-3.19$ ./waf --run scratch/mesh
Waf: Entering directory `/home/amelie/download/ns-allinone-3.19/ns-3.19/build'
Waf: Leaving directory `/home/amelie/download/ns-allinone-3.19/ns-3.19/build'
'build' finished successfully (2.284s)
msg="Invalid attribute set (referenceDistance) on ns3::LogDistancePropagationLossModel", file=../src/core/model/object-factory.cc, line=70
terminate called without an active exception
Command ['/home/amelie/download/ns-allinone-3.19/ns-3.19/build/scratch/mesh'] terminated with signal SIGIOT. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").

在 2014年3月22日星期六UTC+8下午3时40分49秒,Tommaso Pecorella写道:

Tommaso Pecorella

unread,
Mar 22, 2014, 5:14:18 AM3/22/14
to ns-3-...@googlegroups.com
Hi,

a couple of things.

1) I'm quite sure you did modify the example. If you modify an example, copy it into the scratch directory. Also, mention that the issue is about a modified script, otherwise we'll think that it's a ns-3 bug.
2) If the program works on the command line and not in Eclipse, then it's an Eclipse configuration problem.
3) Attributes are case sensitive... "ReferenceDistance"

Let us know if it works

T.

amelie...@gmail.com

unread,
Mar 24, 2014, 10:58:06 PM3/24/14
to ns-3-...@googlegroups.com
Hi,
i do not remember which example file i have modified.and i build second.cc,i can get .pacp files.but if i build mesh.cc first,then build second.cc,there are no .pcap files.and the problem "msg="Invalid value for attribute set (Variable) on ns3::RandomPropagationLossModel", file=../src/core/model/object-factory.cc, line=76
terminate called without an active exception",i do not know how to fix it.

thanks a lot.

在 2014年3月22日星期六UTC+8下午5时14分18秒,Tommaso Pecorella写道:

Tommaso Pecorella

unread,
Mar 25, 2014, 5:05:53 PM3/25/14
to ns-3-...@googlegroups.com

Ines Keskes

unread,
Mar 26, 2014, 9:15:35 AM3/26/14
to ns-3-...@googlegroups.com
Hi, 
I am working with NS3 for LTE Architecture.I Want to add a new module to those given!!!
I am working through Ubuntu 
Which commands am I supposed to write to install the new module 
Reply all
Reply to author
Forward
0 new messages