Module structure and WAF

21 views
Skip to first unread message

Hani Ayoub

unread,
Mar 1, 2016, 7:32:45 AM3/1/16
to ns-3-users
Hi Guys,

My modules structure is as following:
 - doc
 - examples
 - helper
 - model
   - subdir1
     - subdir11
       - file11.cc
       - file11.h
   - subdir2
       - file2.cc
       - file2.h
 - test

My problem:
 - if file11.cc for example has: (#includes "file11.h") -> all fine
 - if file11.h has: (#include "file2.h") -> ./waf shouts on "No such file or directory" for file2.h
   - to fix this, I had to change it to: (#include "../../subdir2/file2.h")
   - this is problematic since I have A LOT of such files

Note: file2.h and file11.h are under headers in wscript

any idea how can I work-around this?

Thanks,
Hani;

Konstantinos

unread,
Mar 1, 2016, 7:40:45 AM3/1/16
to ns-3-users
Hi Hani,

First of all you should you the manual of the ns-3 release that you use (and that shouldn't be 3.13 ..)
There might be changes in the wscript format.

Now, to your question, you can use the 'relative' NS-3 path since you have added those header files in your wscript.

#include "ns3/file2.h" 

Regards,
K.

Hani Ayoub

unread,
Mar 1, 2016, 7:50:14 AM3/1/16
to ns-3-users
Thanks for the quick reply.

The thing is that my module sub-directories are used for another build system and I would like to take it as-is without adding the "ns3" prefix to its includes, neither changing them to the relative path... is that possible?

Thanks,
Hani;

Hani Ayoub

unread,
Mar 2, 2016, 8:59:33 AM3/2/16
to ns-3-users
symlinks in this case helped... not a very clean solution, but does the work. Thanks.
Reply all
Reply to author
Forward
0 new messages