1
votes

I am trying to make the SCIP work with C++ in Windows 10. I want to solve the VRP problem using SCIP (version 3.2.1) in Visual Studio 2010.

I have downloaded Source files and then precompiled dlls from the http://scip.zib.de and included the .hpp and cpp files in my VS project. there was a .dll, a .exe and a .lib file in the archive.

In the project properties I did the following:

C/C++ -> General -> Additional Include Directories: C:\scipoptsuite-3.2.1\scip-3.2.1\src\

C/C++ -> Linker -> Input-> Additional Dependencies: C:\Users\Mahla\Desktop\src\scip-3.2.1.win.x86_64.msvc.opt.spx.ld.lib;

C/C++ -> General -> Input-> Additional Library Dependencies: C:\Users\Mahla\Desktop\src\scip-3.2.1.win.x86_64.msvc.opt.spx.ld.lib;

VC++ Directories-> Include Directories: C:\Users\Mahla\Desktop\src;

VC++ Directories-> Library Directories: C:\Users\Mahla\Desktop\src;

src folder is a copy of src down in the scip root directory.

I copied .dll, .lib and .exe in the Debug folder at the same level as the solution .sln file in Visual Studio.

When building, I get many errors like :

main_vrp.obj : error LNK2001: unresolved external symbol _SCIPcreateConsLinear

Can anyone tell me what is the problem or how to set up an example in VS.

Thank you very much.

1
You could investigate the libraries with this tool to find out where it is expecting its dependencies: dependencywalker.commattmilten
@mattmilten : I haved linked Cplex to the project and also installed scipoptsuite using Cygwin, so I think soplex should have been linked to the SCIP at default. Do I need to link SCIP and Cplex too, for building solution in visual studio?math2014
The dll you downloaded contains SoPlex already. You also cannot link CPLEX to it since you can have only one LP solver at a time. The library should work on its ownmattmilten
Do I need to link .o and .a files in the lib and obj folder in SCIP root directory?math2014
No, these are contained in the library.mattmilten

1 Answers

1
votes

I am using a x64 version of SCIP. So my "Platform" should be x64, not Win32, or it will give LNK errors. I simply changed the platform in configuration manager to x64 and everything was okay then.