HOW TO CONFIGURE THE C++ RUNTIME ENVIRONMENT IN VSCODE
AnsweredHi Folks,
I need some help with my code. I am using Gurobi C++ in VScode.
I am now unable to configure the runtime environment of gurobi and fail to successfully import the gurobi header file.Is there a tutorial or case of configuring the gurobi runtime environment in C in VSCODE?
Thank you in advance.
Best regards.
0
-
Hi Lei Yu,
I was able to run C++ through VSCode by following this guide:
https://code.visualstudio.com/docs/cpp/config-msvc
If it helps, my tasks.json file looks like this:
{ "tasks": [ { "type": "cppbuild", "label": "C/C++: g++ build active file", "command": "/usr/bin/g++", "args": [ "-fdiagnostics-color=always", "-g", "${file}", "-o", "${fileDirname}/${fileBasenameNoExtension}", "-I/Library/gurobi1202/macos_universal2/include", "-L/Library/gurobi1202/macos_universal2/lib", "-lgurobi_c++", "-lgurobi120" ], "options": { "cwd": "${fileDirname}" }, "problemMatcher": [ "$gcc" ], "group": { "kind": "build", "isDefault": true }, "detail": "Task generated by Debugger." } ], "version": "2.0.0" }It may work for you once you make any changes that you need to (e.g. Gurobi version, paths etc).
I use this with “Terminal → Run build task …”
- Riley
0
Please sign in to leave a comment.
Comments
1 comment