Search code examples
c++visual-studioscip

SCIP - SCIPOptSuite - LNK2001 - unresolved external symbol


I am new to SCIP and I encounter this problem when I tried to build the branch-and-price framework I obtained from this link. For your reference, I use MS Visual Studio 2019. I have downloaded and installed the precompiled packages. Then, I conducted the following steps in the property of the project I built in VS 2019.

  1. C/C++ -> General -> Additional Include Directories -> C:\Program Files\SCIPOptSuite 8.0.1\include
  2. Linker -> Input -> C:\Program Files\SCIPOptSuite 8.0.1\lib\libsoplex.lib

Then, I build the program, and many errors (LNK2001) appear, e.g. , unresolved external symbol _imp_SCIPaddCoefLinear, etc.

I have tried to put another library in the Linker, i.e., Linker -> Input -> C:\Program Files\SCIPOptSuite 8.0.1\lib\libscip.lib

But, the program raises another error saying the libscip.dll is not found and I am suggested to re-install the package to fix the problem. I have also tried to reinstall the package, but I still do not have libscip.dll in the folder of SCIPOptSuite 8.0.1.

Do you have any suggestions for properly installing and using the SCIP framework in MS Visual Studio? Thank you in advance.


Solution

  • Obtained from @Richard Critten: "...error saying the libscip.dll is not found ..." the directory containing libscip.dll need to be on the PATH or libscip.dll needs to be in the same directory as the executable.