Google ORTools C++ Makefile

Viewed 290

I'm using ortools in c++ to model a vehicle routing problem. I was wondering whether there was a way to compile the code using my own Makefile by including the proper flags for the compiler, so that I don't have to use

make build SOURCE=/path/to/my/program

I have compiled ortools from source on Debian 10, making sure to follow the proper instructions on the guide (make third-party then make cc then make install_cc). make test_cc runs and finished without problems, so I don't think there is any issues with the installation.

The only clue that I found about this topic was someone writing they used

g++ -std=c++11 -o my_program my_program.cc -I/usr/local/include/or-tools -lortools

to compile their program, but upon trying that, I have a lot of undefined references. I have read somewhere that one should use -std=c++17 instead of -std=c++11 but either way it does not work.

Please let me know if you need more details.

1 Answers
Related