1

I have installed Veins 5 with Omnet++ 5.4.1. I upgraded my veins 4 project to veins 5 as advised here

But, I am facing a new problem where the compiler cannot see Veins library. The error I am getting is as follow: undefined reference to Veins::DemoBaseApplLayer::initialize(int)

I also included veins as a reference project and updated included path in the Makemake option to

"C:\veins5\veins-veins-5a1\src"

Am I missing any further configuration?

I am running Veins under Windows OS.

Suleiman
  • 316
  • 1
  • 4
  • 15
Hamzah
  • 120
  • 6
  • Have you removed old compilation artifacts from your build folders (e.g., using `Project > Clean...` and selecting `Clean all Projects` in the OMNeT++ IDE)? Also, are you getting an error while building Veins or while building your simulation? If the latter, you might try running `make V=1` instead of `make` to compile your project. This will allow you to see what libraries are being linked (last line beginning with `clang++` or `g++`) – Christoph Sommer Jan 28 '19 at 18:29
  • Veins compiles successfully and the example simulation that comes with it works fine as well. I use make V=1 and it seems that the libraries are linked. It shows that Veins libraries are linked. Part of the output is: clang++ -shared -o ... /veins5/veins-veins-5a1/src -lveins -Wl,- rpath,C:/veins5/veins-veins-5a1/src ... – Hamzah Jan 29 '19 at 19:56

1 Answers1

0

The DemoBaseApplLayer of Veins 5 alpha 1 is not prepared to be used as a base class of other simulations' application layers. This can be rectified by changing its source code as follows:

In src/veins/modules/application/ieee80211p/DemoBaseApplLayer.h, line 56, change

class DemoBaseApplLayer : public BaseApplLayer {

to

class VEINS_API DemoBaseApplLayer : public BaseApplLayer {
Christoph Sommer
  • 6,893
  • 1
  • 17
  • 35