how to add qoe monitor into ns3

184 views
Skip to first unread message

youly...@163.com

unread,
May 13, 2013, 5:50:35 AM5/13/13
to ns-3-...@googlegroups.com
Hi, everyone
I'm now trying to add qoe-monitor model  into ns3,but when I ./waf the model, there are errors follows:

./libns3.16-qoe-monitor-debug.so: undefined reference to `av_guess_format'
./libns3.16-qoe-monitor-debug.so: undefined reference to `av_read_frame'
./libns3.16-qoe-monitor-debug.so: undefined reference to `url_fclose'
./libns3.16-qoe-monitor-debug.so: undefined reference to `av_interleaved_write_frame'
./libns3.16-qoe-monitor-debug.so: undefined reference to `av_find_stream_info'
./libns3.16-qoe-monitor-debug.so: undefined reference to `av_register_all'
./libns3.16-qoe-monitor-debug.so: undefined reference to `av_init_packet'
./libns3.16-qoe-monitor-debug.so: undefined reference to `avformat_alloc_context'
./libns3.16-qoe-monitor-debug.so: undefined reference to `av_dump_format'
./libns3.16-qoe-monitor-debug.so: undefined reference to `avio_close'
./libns3.16-qoe-monitor-debug.so: undefined reference to `av_write_trailer'
./libns3.16-qoe-monitor-debug.so: undefined reference to `av_close_input_file'
./libns3.16-qoe-monitor-debug.so: undefined reference to `avcodec_copy_context'
./libns3.16-qoe-monitor-debug.so: undefined reference to `av_set_parameters'
./libns3.16-qoe-monitor-debug.so: undefined reference to `av_write_frame'
./libns3.16-qoe-monitor-debug.so: undefined reference to `url_fopen'
./libns3.16-qoe-monitor-debug.so: undefined reference to `av_write_header'
./libns3.16-qoe-monitor-debug.so: undefined reference to `avio_open'
./libns3.16-qoe-monitor-debug.so: undefined reference to `avformat_open_input'
./libns3.16-qoe-monitor-debug.so: undefined reference to `av_new_stream'
./libns3.16-qoe-monitor-debug.so: undefined reference to `av_free_packet'

I'm new in how to add a new model, woud anyone helpe me on how to solve the problem?
Thanks a lot!

alessandro paganelli

unread,
May 15, 2013, 2:21:34 AM5/15/13
to ns-3-...@googlegroups.com
Hi, 

the error you're pointing out refers to LibAv, which seems missing in your setup, since the linker complains about "undefined reference".
First of all make suer you have LibAv's source code properly installed in your system. 
Assuming you're on Ubuntu (but any Linux distribution *should* work, actually), you can install it by issuing the following command inside a terminal:

sudo apt-get install libav-dbg libav-source libav-tools  libavcodec-dev libavcodec53 libavdevice-dev  libavdevice53  libavfilter2  libavformat-dev  libavformat53  libavutil-dev libavutil51

Then, make sure your bash environment is properly set, with the correct environment variables. Issue in a terminal the following commands to set them:

CXXFLAGS="-Wall -ggdb -g3 -O0 -D__STDC_CONSTANT_MACROS"
CFLAGS="-Wall -ggdb -g3 -O0 -D__STDC_CONSTANT_MACROS"
LINKFLAGS="-L/usr/include/libavcodec -L/usr/include/libavformat/ -L/usr/include/libavutil -lavcodec -lavformat -lavutil"

Please note that LINKFLAGS should point to the correct install path of the LibAv's headers (which may be different on your system).
Then, configure again your NS-3 setup with:

./waf configure

Should you need further help, please take a look at this thread or ask here:

Regards,
Alessandro

youly...@163.com

unread,
May 19, 2013, 10:12:53 PM5/19/13
to ns-3-...@googlegroups.com
Hi,there
Thanks a lot for your reply, but after I install the LibAv's source code in my system, and set the environment, the problem  are still there, and I have taken a look at the thread you gave to me , but  it seems that no one have come with similar problem before.
Reply all
Reply to author
Forward
0 new messages