How to run NS3 with OpenCV together use CMakeLists.txt or other methods.

79 views
Skip to first unread message

yohanna....@gmail.com

unread,
Oct 15, 2016, 11:30:04 AM10/15/16
to ns-3-users
Hi,

I want to use NS3 and OpenCV together in a program. So I wonder if I can use CMake to compile these.
I may need to write a CMakeLists.txt instead of using waf to compile NS3 with OpenCV.
But the problems are:
1. Can CMake realize the configuration of OpenCV and NS3 together;
2. If 1 can be realized, how to write CMakeLists.txt;
3. If 1 can not be realized, how to use OpenCV and NS3 together?

By the way, I read some materials related to "Modify wscript of NS3 to add new modules."
In this way, I  still do not know how to do to achieve what I want---- (Combine OpenCV and NS3).

Sorry if I do not express myself clearly and I really appreciate your help.
Thank you anyway.

Regards,
Yohanna

Tommaso Pecorella

unread,
Oct 17, 2016, 7:17:12 PM10/17/16
to ns-3-users
Hi,

as far as I know, OpenCV is a set of libraries to be used in programs.
It shouldn't be necessary to build together OpenCV and ns-3. You should be able to build and install OpenCV and then "use" OpenCV in your scripts, much like the Boost libraries.
The problem is to add OpenCV to your specific script during the compilation and linking phases, i.e., how to add OpenCV support to WAF.
Practically this is done by adding the proper include and libraries paths in the right places (it depends on if you're just making a script or a module). Search for further details in the forum, this sort of topics hs been discussed in the past.

Hope this helps,

T.
Reply all
Reply to author
Forward
0 new messages