Hello NS-3 users community!
I am having a C++ basic compilation error where my scratch folder code “handovermy.cc” is not able to find the library “json.hpp”.
My question is, which NS-3 directory usually compiler that is looking at "scratch" folder look for libraries where I can add this "json.hpp" file? I have tried adding the “json.hpp” inside the root ns-3 directory and tried to add this file into “scratch” and “contrib” folder but still compiler is not able to find the “json.hpp” file and I am getting below error.
Shell Log:
“@user-VirtualBox:~/Apps/Handover-ns3/ns-3-dev-git$ ./ns3
[ 0%] Building CXX object scratch/CMakeFiles/scratch_handovermy.dir/handovermy.cc.o
/home/user/Apps/Handover-ns3/ns-3-dev-git/scratch/handovermy.cc:42:10: fatal error: json.hpp: No such file or directory
42 | #include <json.hpp>
| ^~~~~~~~~~
compilation terminated.
gmake[2]: *** [scratch/CMakeFiles/scratch_handovermy.dir/build.make:76: scratch/CMakeFiles/scratch_handovermy.dir/handovermy.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:14460: scratch/CMakeFiles/scratch_handovermy.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
Finished executing the following commands:
cd cmake-cache; cmake --build . -j 1 ; cd ..”
Thank you in advance!
This isn't an ns-3 issue, it's more a C++ issue.