On Jun 5, 5:40 am, francesco <
francesco.malandr...@gmail.com> wrote:
> You have to add a line like this to the wscript file of the module/
> directory you are adding/editing (say, ns-3-dev/src/applications/myapp/
> wscript):
[...]
Francesco: Thank you for your reply. I did as you suggested. But
something is still missing.
To wit:
1) I added a link in applications/myapp/wscript as follows:
conf.check(lib='uuid', uselib='UUID', define_name='UUID')
On running waf in applications/myapp, it detected that the
reconfiguration had changed. It reconfigured and reported that 'uuid'
was found:
Checking for library uuid : ok
2) In src/wscript, I added the conf.sub_config(...) as you suggested.
Now, when I run "./waf --run scratch/first", it is still unable to
link to libuuid.so:
./waf --run scratch/first
Entering directory `/home/vijay/sim/ns-allinone-3.4/ns-3.4/build'
[267/267] cxx_link: build/debug/scratch/first_4.o -> build/debug/
scratch/first
debug/libns3.so: undefined reference to `uuid_generate'
collect2: ld returned 1 exit status
Build failed
-> task failed (err #1):
{task: cxx_link first_4.o -> first}
To see which libraries it is linking, I tried "./waf --verbose --run
scratch/first", and not surprisingly, -luuid is not in the link list:
$ ./waf --verbose --run scratch/first
Entering directory `/home/vijay/sim/ns-allinone-3.4/ns-3.4/build'
[267/267] cxx_link: build/debug/scratch/first_4.o -> build/debug/
scratch/first
12:26:25 runner system command -> /usr/lib64/ccache/g++ debug/scratch/
first_4.o -o debug/scratch/first -pthread -Ldebug -Wl,-Bdynamic -lns3 -
lsqlite3 -ldl -lxml2 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -
lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -
lgmodule-2.0 -lglib-2.0 -lrt
debug/libns3.so: undefined reference to `uuid_generate'
collect2: ld returned 1 exit status
Build failed
-> task failed (err #1):
{task: cxx_link first_4.o -> first}
File "./waf", line 127, in <module>
[...]
So, there is still some more magic to be done, but I am not sure
where...
Thanks,
- vijay