configure gurobi for c++ visual studio
AnsweredHi,
I followed the instruction on https://support.gurobi.com/hc/en-us/articles/360013194392-How-do-I-configure-a-new-Gurobi-C-project-with-Microsoft-Visual-Studio-2017- to configure gurobi for a c++ project in visual studio 2019.
On my own pc, that was successful. But when I do this for a school computer I got the following error message ( I do get administrative right for the school computer )
The gurobi file is correctly included, because if I dont declare a GRBEnv( say include "gurobi_c++.h" then just print "hello world" ), the program is executed. Once if I try to use GRBEnv and GRBModel, the above error pops up.
On my pc vs version is 16.2.0, and c++ is Visual c++ 2019 -00435-60000-00000-AA964
On school computer vs version is 16.2.3, and c++ is Visual c++ 2019 -00435-60000-00000-AA071
Can anyone helps on this?
-
Have you debugged your application to see where the abort() is called? It is possible it is coming from the GRBModel which is reading your model file and cannot find the file. Is the model file located on your school computer and in the directory path indicated in your application?
0 -
Hi, actually I did not even declare a GRBModel. Below is the screenshot
It is simple, so I suspect it should be the problem of configuration of Gurobi.
0 -
I have two suggestions of things to test:
Have you had a chance to test your license as decribed here:
https://www.gurobi.com/documentation/8.1/quickstart_windows/testing_your_license.html
Have you tried to build and run the C++ examples provided in the Gurobi distribution?
I hope this helps,
Gwyneth
0 -
Thanks very much, I solved the problem by re-activating the license.
I did not know that the activation of gurobi should be done for each different user of a school PC.
0
Please sign in to leave a comment.
Comments
4 comments