简体   繁体   中英

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 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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM