math2014 math2014 - 1 year ago 162
C++ Question

SCIP and Visual Studio: error LNK2001

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 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/C++ -> Linker -> Input-> Additional Dependencies: C:\Users\Mahla\Desktop\src\;

C/C++ -> General -> Input-> Additional Library Dependencies:

VC++ Directories-> Include Directories:

VC++ Directories-> Library Directories:

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.

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download