In this regard CPLEX is no different than other libraries. There are usually three steps you have to perform:
- Update the list of directories in which the compilier looks for header files. For CPLEX you need to include COSDIR/cplex/include and COSDIR/concert/include (where COSDIR is the absolute path of your CPLEX Optimization Studio installation directory)
- Update the list of directories in which the linker will look for libraries. For CPLEX you need to include COSDIR/cplex/lib/ARCH and COXDIR/concert/lib/ARCH (where ARCH is something platform dependent like x86-64_linux/static_pic).
- Update the list of libraries with which you program is linked.
One easy way to figure out the required flags and directories is to go to COSDIR/cplex/examples/x86-64_linux/static_pic and run
make blend. This will show the compilation and link steps with all required flags.
How you configure vscode for a general 3rd party library I don't know but I guess this is explained in the vscode documentation somewhere.
If you want to move away from IDEs, why not just use plain
make? CPLEX already ships with example makefiles, so you could start from there.
------------------------------
Daniel Junglas
------------------------------