Subfolders in model/ folder

24 views
Skip to first unread message

Victor Caballero

unread,
Nov 2, 2017, 11:09:03 AM11/2/17
to ns-3-users
Hello,

I am developing an ns3 module and I am trying to better organise my code. The thing is that when I build my module and let's say, a file in model/file.h has an #include "relationships/relationships.h" it doesn't build. The reported error is that the file (.h) does not exist. I have added the appropriate file path to the wscript of the module -> 'model/relationships/relationships.h' . It is strange because I have successfully added files residing in "model/file.h. Is it possible to have subfolders?

Thank you in advance.

Tommaso Pecorella

unread,
Nov 2, 2017, 7:51:46 PM11/2/17
to ns-3-users
Hi,

it is possible, check the src/mesh module.
About why it doesn't find your header... dunno.

T.

Victor Caballero

unread,
Nov 3, 2017, 5:35:31 AM11/3/17
to ns-3-users
Hello,

I have checked the mesh module, I have spotted the difference and it works know, but not the way I intended too. So, if I include the file as "ns3/fileinsubfolder.h" it works, but if I include the file as "subfolder/fileinsubfolder.h" it doesn't.  I guess it is because at the time of building the files, everything goes into a "ns3" folder with no more nested subfolders. What I don't like about this approach is that eclipse doesn't recognize the file and then it doesn't help me in autocompletion and syntax checking :(. Am I missing something?

Thank you,
Reply all
Reply to author
Forward
0 new messages