SCIP and Visual Studi: error LNK2019 - c++

I want to solve the n-queens problem using SCIP (version 3.2.1) in Visual Studio 2010 (version 10.0.40219.1).
Source files can be found here: 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.
In the project properties I did the following:
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? 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. It will contain everything necessary to work with SCIP.
Alternatively, you may also just use the precompiled dlls from the webpage:
http://scip.zib.de/#download

Related

CVI Project to Visual Studio Project

I'm trying to move a project from LabWindows/CVI 9 to Visual studio, I've been correcting errors by importing cvi libraries, now I've run into this error, but I can't find where the library comes from and it seems to be the last one I'm missing
LNK2019 unresolved external symbol _main referenced in function _WinMain#16 MES_Control_2.0.3.39 cviwmain.lib(extwmain.obj)
in the case of the other libraries it gave the same error but now I can't find extwmain.c or extwmain.lib
Your project already is configured to link cviwmain.lib. The error means it needs a main() function. You probably configured your project as a windows application(not a console application), so just remove that library because you don't need it. See this documentation for detail.

Include all source file for build

I have C++ project in my Visual Studio. Additionally I placed directory with source files in it in order to use them like library in my main project.
Everything works fine while code browsing. I can define includes of library headers and navigate to functions.
I got problem during project build. I got a lot of linking errors which tells that system can't link to functions from library.
Error LNK2019 unresolved external symbol lv_task_create referenced in function monitor_init testLVGL C:\cpp_test\testLVGL\monitor.obj 1
Error LNK2019 unresolved external symbol lv_tick_inc referenced in function "int __cdecl tick_thread(void *)" (?tick_thread##YAHPEAX#Z) testLVGL C:\cpp_test\testLVGL\testLVGL.obj 1
Error LNK2019 unresolved external symbol lv_task_handler referenced in function SDL_main testLVGL C:\cpp_test\testLVGL\testLVGL.obj 1
Looks like Visual C++ is even not trying to build library.
How to tell Visual C++ to include all library files located in subdirectory in order to build and link to project?
Visual Studio does not include all the files in a directory on its own. You need to explicitly include them (you dont have to do this if you add a file within the Solution Explorer or within Visual Studio). Else it wont be listed to the compiler.
To include them, go to the solution explorer and select "Show all files". This will show you all the files in the directory. Then you can see the unlisted files marked with a red icon. Right click it and hit "Include in project" and the red icon will disappear. After this, the file will be listed as one of the project's file.

Dlib LNK2001 unresolved external symbol USER_ERROR__inconsistent_build_configuration__see_dlib_faq_2

I am trying to implement the DLIB 19.15 library to my app. I generated the dlib project for Windows Visual Studio 15 2017 Win64 and made a Release build using CMAKE.
In the project I have added directories and additional dependencies.
But during compilation I have following error
LNK2001 unresolved external symbol USER_ERROR__inconsistent_build_configuration__see_dlib_faq_2
How Can I solve this problem?
Meet the same problem. You need to add one cpp file named dlib_path\dlib\all\source.cpp from the dlib source directory to your project and re-compile it. Do not copy it to your project path, just add it from dlib source directory.

how to build voro++ in visual studio 2017?

I have downloaded the last version on voro++, then I have added voro++ src path to "include directories". However, this error occured:
LNK2019 unresolved external symbol "public: __thiscall voro::voronoicell_base::voronoicell_base(void)" (??0voronoicell_base#voro##QAE#XZ) referenced in function "public: __thiscall voro::voronoicell::voronoicell(void)" (??0voronoicell#voro##QAE#XZ)
How can I solve this problem?
This library is distributes as source code and uses make file based build system. You need to compile it first into static library. Note that it does not support Visual Studio out of box so to build it you'll probably need to set up your own VS project and deal with all the porting issues that may arise.

Kinect + Visual Studio 2013 LNK errors, how to properly link the library?

I downloaded kinect sdk both 1.8, and 2.0. I then created a new project, and edited its properties via C/C++ and included x86 headers folders
I also edited its Linker and added its corresponding x86 libraries folder.
Yet I still get linking errors, and it's not clear to me what it may be.
error LNK2019: unresolved external symbol __imp__NuiInitialize#4 referenced in function _wmain
error LNK1120: 1 unresolved externals
Any idea? Not sure what else I can do in the linker settings.
Problem resolved,
In addition to
C/C++ include
Linker library
You also need to edit
Linker Input
In here you add Kinect10.lib (or Kinect20.lib, depending on what version you're using)