简体   繁体   English

SCIP和Visual Studi:错误LNK2019

[英]SCIP and Visual Studi: error LNK2019

I want to solve the n-queens problem using SCIP (version 3.2.1) in Visual Studio 2010 (version 10.0.40219.1). 我想在Visual Studio 2010(版本10.0.40219.1)中使用SCIP(版本3.2.1)解决n皇后问题。

Source files can be found here: http://scip.zib.de/download/files/Queens.tgz 可以在以下位置找到源文件: http : //scip.zib.de/download/files/Queens.tgz
I did not write any code myself, but just included queens.hpp, scip_exceptions.hpp, queens.cpp and queens_main.cpp in my VS project. 我自己没有编写任何代码,只是在我的VS项目中包含了queens.hpp,scip_exceptions.hpp,queenss.cpp和queens_main.cpp。

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++ -> General -> Additional Include Directories -> C:\\scipoptsuite-3.2.1\\scip-3.2.1\\src\\

When building, I get errors like: 在构建时,出现如下错误:

 LNK2019: unresolved external symbol SCIPaddCons referenced in function "public: __thiscall cipexamples::QueensSolver::QueensSolver(unsigned int)"

I understand that I will have to link SCIP libraries to my project? 我知道我必须将SCIP库链接到我的项目吗? But I do not know which ones and where to find them? 但是我不知道在哪里找到它们?

You need to compile the SCIP Optimization Suite first to obtain the libscipopt that you need to link to your project. 您需要首先编译SCIP Optimization Suite,以获取需要链接到项目的libscipopt It will contain everything necessary to work with SCIP. 它将包含使用SCIP所需的一切。

Alternatively, you may also just use the precompiled dlls from the webpage: http://scip.zib.de/#download 或者,您也可以只使用网页中预编译的dll: http//scip.zib.de/#download

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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