Search code examples
c++windows-7omnet++veinssumo

Veins 4.7 Omnet++ 5.3 build error in windows 7


I am new to vein and omnet++. I followed this tutorial http://veins.car2x.org/tutorial/ everything works up to step 3, for some reason veins 4.7 doesn't build in omnet++ 5 (IDE) and generates the following errors.

veins/modules/utility/TimerManager.cc
In file included from veins/modules/utility/TimerManager.cc:20:
.\veins/modules/utility/TimerManager.h:137:26: error: expected identifier
  enum class StartMode { RELATIVE, ABSOLUTE, IMMEDIATE };
                         ^
C:\Users\Abu\src\omnetpp-5.3\tools\win64\mingw64\x86_64-w64-mingw32\include\wingdi.h:1434:18: note: expanded from macro 'RELATIVE'
#define RELATIVE 2
                 ^
In file included from veins/modules/utility/TimerManager.cc:20:
.\veins/modules/utility/TimerManager.h:137:36: error: expected identifier
  enum class StartMode { RELATIVE, ABSOLUTE, IMMEDIATE };
                                   ^
C:\Users\Abu\src\omnetpp-5.3\tools\win64\mingw64\x86_64-w64-mingw32\include\wingdi.h:1433:18: note: expanded from macro 'ABSOLUTE'
#define ABSOLUTE 1
                 ^
In file included from veins/modules/utility/TimerManager.cc:20:
.\veins/modules/utility/TimerManager.h:138:24: error: expected identifier
  enum class EndMode { RELATIVE, ABSOLUTE, REPITITION, OPEN };
                       ^
C:\Users\Abu\src\omnetpp-5.3\tools\win64\mingw64\x86_64-w64-mingw32\include\wingdi.h:1434:18: note: expanded from macro 'RELATIVE'
#define RELATIVE 2
                 ^
In file included from veins/modules/utility/TimerManager.cc:20:
.\veins/modules/utility/TimerManager.h:138:34: error: expected identifier
  enum class EndMode { RELATIVE, ABSOLUTE, REPITITION, OPEN };
                                 ^
C:\Users\Abu\src\omnetpp-5.3\tools\win64\mingw64\x86_64-w64-mingw32\include\wingdi.h:1433:18: note: expanded from macro 'ABSOLUTE'
#define ABSOLUTE 1
                 ^
veins/modules/utility/TimerManager.cc:42:28: error: expected unqualified-id
  start_mode_ = StartMode::RELATIVE;
                           ^
C:\Users\Abu\src\omnetpp-5.3\tools\win64\mingw64\x86_64-w64-mingw32\include\wingdi.h:1434:18: note: expanded from macro 'RELATIVE'
#define RELATIVE 2
                 ^
veins/modules/utility/TimerManager.cc:48:28: error: expected unqualified-id
  start_mode_ = StartMode::ABSOLUTE;
                           ^
C:\Users\Abu\src\omnetpp-5.3\tools\win64\mingw64\x86_64-w64-mingw32\include\wingdi.h:1433:18: note: expanded from macro 'ABSOLUTE'
#define ABSOLUTE 1
                 ^
veins/modules/utility/TimerManager.cc:54:24: error: expected unqualified-id
  end_mode_ = EndMode::RELATIVE;
                       ^
C:\Users\Abu\src\omnetpp-5.3\tools\win64\mingw64\x86_64-w64-mingw32\include\wingdi.h:1434:18: note: expanded from macro 'RELATIVE'
#define RELATIVE 2
                 ^
veins/modules/utility/TimerManager.cc:60:24: error: expected unqualified-id
  end_mode_ = EndMode::ABSOLUTE;
                       ^
C:\Users\Abu\src\omnetpp-5.3\tools\win64\mingw64\x86_64-w64-mingw32\include\wingdi.h:1433:18: note: expanded from macro 'ABSOLUTE'
#define ABSOLUTE 1
                 ^
veins/modules/utility/TimerManager.cc:86:19: error: expected unqualified-id
  case StartMode::RELATIVE:
                  ^
C:\Users\Abu\src\omnetpp-5.3\tools\win64\mingw64\x86_64-w64-mingw32\include\wingdi.h:1434:18: note: expanded from macro 'RELATIVE'
#define RELATIVE 2
                 ^
veins/modules/utility/TimerManager.cc:88:30: error: expected unqualified-id
    start_mode_ = StartMode::ABSOLUTE;
                             ^
C:\Users\Abu\src\omnetpp-5.3\tools\win64\mingw64\x86_64-w64-mingw32\include\wingdi.h:1433:18: note: expanded from macro 'ABSOLUTE'
#define ABSOLUTE 1
                 ^
veins/modules/utility/TimerManager.cc:90:19: error: expected unqualified-id
  case StartMode::ABSOLUTE:
                  ^
C:\Users\Abu\src\omnetpp-5.3\tools\win64\mingw64\x86_64-w64-mingw32\include\wingdi.h:1433:18: note: expanded from macro 'ABSOLUTE'
#define ABSOLUTE 1
                 ^
veins/modules/utility/TimerManager.cc:98:17: error: expected unqualified-id
  case EndMode::RELATIVE:
                ^
C:\Users\Abu\src\omnetpp-5.3\tools\win64\mingw64\x86_64-w64-mingw32\include\wingdi.h:1434:18: note: expanded from macro 'RELATIVE'
#define RELATIVE 2
                 ^
veins/modules/utility/TimerManager.cc:100:26: error: expected unqualified-id
    end_mode_ = EndMode::ABSOLUTE;
                         ^
C:\Users\Abu\src\omnetpp-5.3\tools\win64\mingw64\x86_64-w64-mingw32\include\wingdi.h:1433:18: note: expanded from macro 'ABSOLUTE'
#define ABSOLUTE 1
                 ^
veins/modules/utility/TimerManager.cc:102:17: error: expected unqualified-id
  case EndMode::ABSOLUTE:
                ^
C:\Users\Abu\src\omnetpp-5.3\tools\win64\mingw64\x86_64-w64-mingw32\include\wingdi.h:1433:18: note: expanded from macro 'ABSOLUTE'
#define ABSOLUTE 1
                 ^
veins/modules/utility/TimerManager.cc:106:26: error: expected unqualified-id
    end_mode_ = EndMode::ABSOLUTE;
                         ^
C:\Users\Abu\src\omnetpp-5.3\tools\win64\mingw64\x86_64-w64-mingw32\include\wingdi.h:1433:18: note: expanded from macro 'ABSOLUTE'
#define ABSOLUTE 1
                 ^
15 errors generated.
make[1]: *** [Makefile:205: ../out/clang-debug/src/veins/modules/utility/TimerManager.o] Error 1
make[1]: Leaving directory '/c/Users/Abu/src/veins-4.7/src'
make: *** [Makefile:12: all] Error 2

I am also using sumo_win64_0.32.0. I am not sure what causes these errors.

Any help is greatly appreciated.


Solution

  • The issue has been fixed in this pull request and a new minor revision of Veins (i.e. Veins 4.7.1) has been released. Please download the new version to get the fix and also some additional improvements.