how to compile *.cc file in ns3-dce

683 views
Skip to first unread message

Akshay Tambe

unread,
Mar 22, 2014, 5:53:31 AM3/22/14
to ns-3-...@googlegroups.com
Hi,
I want to know that how to comile *.cc file. I created a file BGP.cc in dce/source/ns-3-dce/myscripts/ns-3-dce-quagga/example now to get its executable file I need to compile it. I uses instructions from the link

 http://www.nsnam.org/docs/dce/manual/html/dce-user-newapps.html

But it shows error as follows.

:~/dce/source/ns-3-dce$ gcc -fPIC -c myscripts/ns-3-dce-quagga/example/bgp.cc
myscripts/ns-3-dce-quagga/example/bgp.cc:1:32: fatal error: ns3/network-module.h: No such file or directory
compilation terminated.

Please tell me solution/ process to compile this file.

Thank You.

Akshay Tambe

unread,
Mar 24, 2014, 1:12:08 AM3/24/14
to ns-3-...@googlegroups.com
I got some hints from
https://groups.google.com/forum/#!topic/ns-3-users/vMFu5xGwFCU

So by using
$ ./waf clean
$ ./waf
created bgp.o file. but still I dont know how to get executable file for it.
please help.

Thank you.

Hajime Tazaki

unread,
Mar 31, 2014, 10:06:46 AM3/31/14
to ns-3-...@googlegroups.com

Hi,

is bgp.cc an executable file in usual Linux host ?
or is it an ns-3 simulation script ?

if the former case, you should compile/link the file by yourself.
the following doc should help you.

http://www.nsnam.org/docs/dce/manual/html/dce-user-newapps.html

once you built the binary, you need to create an ns-3
simulation script to load that binary.

if the latter case, you can put your simulation script at
ns-3-dce/myscripts directory, then ./waf command should
build the script for your simulation.

hope that helps.

-- Hajime

At Sun, 23 Mar 2014 22:12:08 -0700 (PDT),
Akshay Tambe wrote:
>
> [1 <text/plain; UTF-8 (7bit)>]
> --
> You received this message because you are subscribed to the Google Groups "ns-3-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
> To post to this group, send email to ns-3-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/ns-3-users.
> For more options, visit https://groups.google.com/d/optout.
> [2 <text/html; UTF-8 (quoted-printable)>]
>

Mohammad Abu Shattal

unread,
Jul 14, 2015, 2:12:21 PM7/14/15
to ns-3-...@googlegroups.com
I have the same problem while compiling dce-emu-ping.cc, in myscripts/ping directory.  Am I missing something ?

>> gcc -fPIC -c dce-ping.cc
>> dce-ping.cc:1:32: fatal error: ns3/network-module.h: No such file or directory
>> #include "ns3/network-module.h"
>>                                ^
>> compilation terminated.
Reply all
Reply to author
Forward
0 new messages