SCIP and Visual Studio: error LNK2001

两盒软妹~` 提交于 2020-02-23 03:57:46

问题


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:


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.



来源:https://stackoverflow.com/questions/40437093/scip-and-visual-studio-error-lnk2001

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!