SCIP和Visual Studio:错误LNK2001 [英] SCIP and Visual Studio: error LNK2001
问题描述
我正在尝试使SCIP在Windows 10中与C ++一起使用. 我想在Visual Studio 2010中使用SCIP(版本3.2.1)解决VRP问题.
我已经下载了源文件,然后从 http://scip.zib.de 和在我的VS项目中包括了.hpp和cpp文件. 存档中有一个.dll,.exe和.lib文件.
在项目属性中,我执行了以下操作:
C/C ++->常规->其他包含目录: C:\ scipoptsuite-3.2.1 \ scip-3.2.1 \ src \
C/C ++->链接器->输入->其他依赖项:C:\ Users \ Mahla \ Desktop \ src \ scip-3.2.1.win.x86_64.msvc.opt.spx.ld.lib; >
C/C ++->常规->输入->其他库依赖项: C:\ Users \ Mahla \ Desktop \ src \ scip-3.2.1.win.x86_64.msvc.opt.spx.ld.lib;
VC ++目录->包括目录: C:\ Users \ Mahla \ Desktop \ src;
VC ++目录->库目录: C:\ Users \ Mahla \ Desktop \ src;
src文件夹是scip根目录中src的副本.
我将.dll,.lib和.exe复制到了Debug文件夹中,该文件夹与Visual Studio中的解决方案.sln文件处于同一级别.
在构建时,出现很多错误,例如:
main_vrp.obj:错误LNK2001:无法解析的外部符号_SCIPcreateConsLinear
谁能告诉我问题出在哪里或如何在VS中建立示例.
非常感谢您.
我正在使用x64版本的SCIP.所以我的平台"应该是x64,而不是Win32,否则会出现LNK错误. 我只是将配置管理器中的平台更改为x64,然后一切正常.
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.
这篇关于SCIP和Visual Studio:错误LNK2001的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!