I can see that the files messages.pb.cc and messages.pb.h files are build in path: build/include/model path/*,
and file messages_pb2.py is built in path: contrib/opengym/model/ns3gym/ns3gym/model/*.
However, I meet the error during the build command that:
`[ 27%] Running cpp protocol buffer compiler on model/messages.proto
Scanning dependencies of target libopengym-obj
[ 27%] Building CXX object contrib/opengym/CMakeFiles/libopengym-obj.dir/helper/opengym-helper.cc.o
[ 27%] Building CXX object contrib/opengym/CMakeFiles/libopengym-obj.dir/model/container.cc.o
In file included from /home/ubuntu/ns-3-dev/contrib/opengym/model/container.cc:23:
/home/ubuntu/ns-3-dev/contrib/opengym/model/container.h:27:10: fatal error: messages.pb.h: No such file or directory
27 | #include "messages.pb.h"
| ^~~~~~~
[ 27%] Building CXX object src/flow-monitor/CMakeFiles/libflow-monitor-obj.dir/model/flow-probe.cc.o
`
I think the built messages.pb.h could not be found. How could I solve this problem?
Many thanks!
I solved this problem by modifying:
27 | #include "messages.pb.h"
to
27 | #include "model/messages.pb.h"
in container.cc
and the problem is solved. Thanks!
During the build progress,
I can see that the files messages.pb.cc and messages.pb.h files are build in path: build/include/model path/*,
and file messages_pb2.py is built in path: contrib/opengym/model/ns3gym/ns3gym/model/*.
However, I meet the error during the build command that:
`[ 27%] Running cpp protocol buffer compiler on model/messages.proto Scanning dependencies of target libopengym-obj
[ 27%] Building CXX object contrib/opengym/CMakeFiles/libopengym-obj.dir/helper/opengym-helper.cc.o
[ 27%] Building CXX object contrib/opengym/CMakeFiles/libopengym-obj.dir/model/container.cc.o In file included from /home/ubuntu/ns-3-dev/contrib/opengym/model/container.cc:23: /home/ubuntu/ns-3-dev/contrib/opengym/model/container.h:27:10: fatal error: messages.pb.h: No such file or directory 27 | #include "messages.pb.h" | ^
~~~~~~compilation terminated.
make[2]: *** [contrib/opengym/CMakeFiles/libopengym-obj.dir/build.make:93: contrib/opengym/CMakeFiles/libopengym-obj.dir/model/container.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:5563: contrib/opengym/CMakeFiles/libopengym-obj.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 27%] Building CXX object src/flow-monitor/CMakeFiles/libflow-monitor-obj.dir/model/flow-probe.cc.o ` I think the built messages.pb.h could not be found. How could I solve this problem? Many thanks!