1

I have an error with omnet++5.1.1 and veins4.6. While build the project, I received error message as below:

g++ -c -std=c++11 -g -Wall -MMD -MP -MF out/gcc-debug//Attacker.d    -isystem /usr/include -isystem /mingw64/include -fno-stack-protector  -DXMLPARSER=libxml -DPREFER_QTENV -DWITH_QTENV -DWITH_TKENV -DWITH_PARSIM -DWITH_NETBUILDER -DWITH_OSG -DWITH_OSGEARTH  -DINET_IMPORT  -I/c/Users/xiruoliu/src/omnetpp-5.1.1/include -o out/gcc-debug//Attacker.o Attacker.cc
In file included from Attacker.cc:21:0:
Attacker.h:26:68: fatal error: 
veins/modules/application/ieee80211p/BaseWaveApplLayer.h: No such file or directory
#include "veins/modules/application/ieee80211p/BaseWaveApplLayer.h"
                                                                ^
compilation terminated.
make: *** [Makefile:105: out/gcc-debug//Attacker.o] Error 1

I also tried to add the veins directory in makefile or change the directory in include statement to the complete path as #include "/c/Users/xiruoliu/src/veins-4.6/src/veins/modules/application/ieee80211p/BaseWaveApplLayer.h". But it still failed.
The code used to work with oment++5.0 and veins4.5. Does anyone has a clue?

Sissi
  • 65
  • 1
  • 10
  • A verbose make run (append V=1 to the make command line) might shed some light on this. You can see which directories are used as base directories for searching include files. – Christoph Sommer Aug 11 '17 at 13:11
  • I tried make V=1 and the directories shown are: -DINET_IMPORT C:/Users/xiruoliu/src/veins-4.6 -I/c/Users/xiruoliu/src/omnetpp-5.1.1/include – Sissi Aug 11 '17 at 22:03
  • The command you mentioned only has one -I option and this is for OMNeT++ modules, not for Veins modules. Something must be wrong with your installation. You might want to try building from the command line. Alternatively, a fresh install might help. – Christoph Sommer Aug 13 '17 at 14:08
  • I re-make veins and my own project in the directory of omnetpp-5.1.1/samples, but it still does not work. Then I tried to modify the makefile of my proejct (replace INCLUDE_PATH = -I. with INCLUDE_PATH = -I/c/Users/xiruoliu/src/omnetpp-5.1.1/samples/veins-4.6). From the compilation output, I have " -I/c/Users/xiruoliu/src/omnetpp-5.1.1/samples/veins-4.6" included, but still I have the same error message. What is the correct path I should include? – Sissi Aug 14 '17 at 20:01
  • You could try opening an OMNeT++ command line, change to the Veins directory (cd .., cd veins-4.6), then run ./configure followed by make V=1 – Christoph Sommer Aug 14 '17 at 20:58
  • It is very weird that the makefile is overwritten when I compile it. In the make file, I tried to include veins directory by changing "INCLUDE_PATH = -I. -I$(INET_PROJ)/src" to "INCLUDE_PATH = -I. -I$(INET_PROJ)/src -I../veins/src". However, after I compile it, the include path changed to "INCLUDE_PATH = -I. -I$(INET_PROJ)/src -Isrc" automatically. Why does this happen? – Sissi Aug 23 '17 at 23:55
  • Have you checked the makemake configuration of your project after upgrading OMNeT++? Right click on your project, open its preferences and check that makemake is configured to automatically add include paths exported from referenced projects. Also check that your project references the Veins project. If you need guidance with this step, I will be happy to provide a screenshot – Christoph Sommer Aug 24 '17 at 01:09
  • Thanks for your instructions, Christoph! I finally resolved this issue by manually adding the veins directory into Makemake options -> compile -> included path. And now it compiles, but when I run it, I receives error "Cannot load library '../inet/src//libINET.dll'". libINET.dll is in inet/src directory. I tried re-build inet, veins and my own project, but it does not work. – Sissi Aug 25 '17 at 00:39
  • `../inet` sounds like the OMNeT++ IDE expects the INET Framework to be installed exactly one folder up from your simulation, in a subdirectory called `inet`. Can you confirm this to be true? Otherwise, you will likely need to supply custom command line options to `opp_run` or launch your simulation from the command line altogether – Christoph Sommer Aug 25 '17 at 08:59
  • My simulation is in the same folder as inet. They are at same directory level. I configured link option in Makemake to INET and added inet path to paths and symbols to solve this issue. – Sissi Aug 28 '17 at 16:55

0 Answers0