Can I use gurobi by the c interface from the Code::bloks IDE for windows?

109 views
Skip to first unread message

José Alberto Araúzo Araúzo

unread,
Mar 20, 2018, 11:34:24 AM3/20/18
to Gurobi Optimization
Dear Colleagues. I'trying to use Gurobi by de c interface from the 
Code::bloks IDE for Windows. I have set in the linker settings the path 
of gurobi74.lib and y I have put into the include headers the gourobi_c.h interface, but 
the linker don't work properly. It shows some error mesagges like 
"undefined reference to GRBnewmodel@36". I heve tried to solve it in 
several ways but I have not achieved it. Can someone help me.

Thanks in advance.

Michael Winkler

unread,
Mar 20, 2018, 1:29:41 PM3/20/18
to Gurobi Optimization
Hi José,

I'm not familiar with the IDE but the error points to a linking issue. So the reference to gurobi75.lib (there is no gurobi74) seems to be incorrect.

Best,
Michael

José Alberto Araúzo Araúzo

unread,
Mar 20, 2018, 1:54:04 PM3/20/18
to Gurobi Optimization
Sorry, it's a typo. I wanted to write gurobi75.lib, but it's not the problem. I think the problem is the compiler. ¿Do you know what compiler I have to use for C in windows 64 bytes?
The Guroby site says that the compiler for C++ must be Visual Studio. ¿Is it the same for C?
Thanks

wujian

unread,
Mar 21, 2018, 7:06:12 AM3/21/18
to Gurobi Optimization
  Hi,
  
  According to my experience, Mingw-w64 compiler is supported by Gurobi on Windows, I don't use CodeBlocks or other IDEs, but you may follow the command line steps in the screenshots below, which demonstrate the use of C and C++ interface of Gurobi on 64-bit Windows.

Regards,
Wu Jian





在 2018年3月20日星期二 UTC+8下午11:34:24,José Alberto Araúzo Araúzo写道:

Michael Winkler

unread,
Mar 21, 2018, 10:01:44 AM3/21/18
to Gurobi Optimization
You could use the Visual Studio compiler "cl.exe" or the Intel Compiler "icl.exe".

Best,
Michael
Reply all
Reply to author
Forward
0 new messages