Search code examples
c++omnet++

Build error in building of a project has the INET reference


I want to simulate a project including the INET reference, but the following error has generated. How to fix it?

.
.
.
Creating executable: ../out/clang-debug/src/D2DCommunication_dbg
/usr/bin/ld: cannot find -lINET_dbg
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [../out/clang-debug/src/D2DCommunication_dbg] Error 1
Makefile:109: recipe for target '../out/clang-debug/src/D2DCommunication_dbg' failed
make[1]: Leaving directory '/home/reza/omnetpp/omnetpp-5.6.1/samples/D2DCommunication/src'
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 2
"make MODE=debug all" terminated with exit code 2. Build might be incomplete.

19:24:15 Build Failed. 5 errors, 2 warnings. (took 6s.698ms)

Solution

  • It seems that you have built INET in release mode, while the project referenced to INET is built in debug mode. However, both projects must be built in the same mode.
    Assuming that you need debug mode, in Eclipse right click in INET, chose Build Configurations, then Set Active and select gcc-debug or debug.