direct-code-execution / ns-3-dce

Run real programs in the discrete time simulator ns3
http://www.nsnam.org/projects/direct-code-execution/
75 stars 46 forks source link

how to use user-defined class in DCE? #139

Closed watalou closed 1 year ago

watalou commented 1 year ago

Description of the problem

I've defined some helper and model class in NS3, and I put these files in directory ./bake/source/ns-3.34/contrib, and I can successfully run scripts using aforementioned helper and model class under NS3 (i.e., under directory ./bake/source/ns-3.34, run ./waf --run mytest, and mytest.cc is the script).

However, when I write a script dcetest.cc in DCE (I put the script under directory ./bake/source/ns-3-dce/myscripts/ns-3-dce-quagga/example), and run ./waf --run dcetest under directory ./bake/source/ns-3-dce/, it reports cannot find the user-defined class (located in ../bake/source/ns-3.34/contrib).

I find the user-defined class has added into the directories ./bake/build/include/ns3.34/ns3/ and ./bake/source/ns-3.34/build/ns3, but not in the directory ./bake/source/ns-3-dce/build/include/ns3.

I've also tried copy the user-defined classes' header files into the directory ./bake/source/ns-3-dce/build/include/ns3, and exported the directory ./bake/build/include/ns3.34/ns3/ to the PATH env variable, both attempts are failed.

So how to use NS3's user-defined class in DCE? Thanks a lot!

----------------------------------- Has been solved. 2022/12/21