0

I want to use PyTorch with Veins due to which I need to compile the code using C++14 standard. I looked up OMNET++ and Veins documentation but found nothing.

I am using macOS (11.5) and Ubuntu (18.04 and 20.04). I could install the precxx11 version of PyTorch for Ubuntu but there is no such option for macOS. Hence, I have no other option but to use C++14.

How would I go about achieving this?

Raashid
  • 149
  • 9

2 Answers2

2

Check configure.user change (uncomment) the CXXFLAGS variable there and set it to -std=c++14, then run ./configure and then clean/rebuild OMNeT++ and all of your models so everything would use C++14 as default. OMNeT++ 6.x is using C++14 by default.

Rudi
  • 6,418
  • 1
  • 16
  • 20
  • My solution worked as well but I wanted to mark this as the accepted answer as it seemed less hacky. – Raashid Aug 31 '21 at 21:16
1

I added the following line at the end of the makefrag file:

CXXFLAGS += -std=c++14
Raashid
  • 149
  • 9