Intel IPP: unresolved external symbol _ippiResizeGetSize_8u#32 - c++

I am having an odd issue and think there is a simple answer to that but I guess I just can't see the forest because of all the trees.
I am trying to compile a program using Intel IPP (Visual Studio 2015) and get the following error message:
unresolved external symbol _ippiResizeGetSize_8u#32
I added the appropriate folders to the project properties, which did not work. So just to be on the safe side I just copied all static libs and the corresponding header files into the folder where to code of the program lies. It does find the header files but I am also getting the above error. The libs are added as dependencies. I have set IPP so that it uses single-threaded static libraries.
What am I doing wrong here? It seems to be straightforward.
Thank you
Pat

All unresolved symbol error come from VS linker. Basically, it means that you haven't added to linker "input" property the static library, which resolves the required external name.
In your case it is IPP image processing library, i.e. "ippimt.lib" (of the latest IPP versions), or "ippi_l.lib" of IPP v.7.x.
You can add the full name of ippi* library to "input" property, or add IPP library directory to the "general/additional directory" property of VS linker and name of the library file to "input" property. You don't need to copy static libraries to working directory, it doesn't work.
Regards, Sergey

Related

C++ LNK2019 Error, lib has been added to linker

First time I actually started writing a project in C++, for purposes. I'd like to include the TNL library.
The header files are already defined correctly and can use them. For the linker, when i try to use a function that's in the lib file it still gives me a LNK2019 error. The lib is added to the linker.
Error message example:
Here are some screenshots with the paths. I 'think' that i've put them correctly but could definitely looked over something.
Additional Dependencies:
Additional Library Directories
Actual Library Lib's are located at:
I'm probably tunnel-visioning on something. But I'm stuck right now and I'm clueless.
The unresolved symbol is _closesocket#4, which should probably resolve to closesocket() from the Windows sockets library. Try adding "Ws2_32.lib" to the Additional Dependencies line.

Embedding python 3 in c++ vs2015

I want to embed python code in C++ console application vs2015. I followed the tutorial https://docs.python.org/3/extending/embedding.html, the very first example, 5.1 Very High Level Embedding. But when I built (in release mode) it shows an error: unresolved external symbol ___imp__py_initialize.
I guess error occurred cause I don't Include some .lib or .obj files, so I include python.h and python.lib but I'm not sure.
(I'm not good in English, so excuse me ...)
If you are sure that you have set the input and library directories correctly, then the cause of the linker problem might be that you are mixing codes of different bitnesses. Make sure that for example, you are not linking against the 64-bit versions of the Python libs in a 32-bit application.
"unresolved external symbol" is a linker error that means you forgot to link to a .lib file.
The Visual C++ project settings you need to embed Python are (for example Python 3.5):
C/C++, General, Additional include directories: C:\Python35\include
Linker, General, Additional library directories: C:\Python35\libs
You don't need to manually specify the .lib file because pyconfig.h auto-links to it when included.

OpenCV and Visual Studio 2015: Why is including the static library not working?

I'm trying to set up a VS2015 solution I have with OpenCV 3.0.0, and I'm trying to do so using static libraries only.
Header files: the OpenCV header files are included correctly and I can reference them in my source files without issue.
Libraries: the static library file that was created for me when I used CMake to build OpenCV (called "ippicvmt.lib") is included correctly, and loads without issue.
Using OpenCV in code: when I try to use OpenCV classes/functions in my solution, I get linker errors when building similar to
LNK2001: unresolved external symbol "public: virtual double __thiscall cv::VideoCapture::get(int)const
I can right-click and choose "Go to definition" on my use of this function and it opens videoio.hpp and shows the declaration of the virtual method. The linker error I see is likely caused by the inability for visual studio to find the actual implementation of the method in the static library I have included in my solution.
It is my understanding that the only .lib file I need to include is the one static library file. That is all I have included right now.
Does anybody know why VS can't find the implementations of this code in the OpenCV static library?
I fixed my issue by disabling the flag for building with shared libs in CMake, after that way more .lib files show up in the sharedlib folder in my install. I added each .lib file I wanted to use to my additional dependencies in my project properties and my project built.

OGRE error LNK2001: unresolved external symbol

I'm trying to get some OGRE sample to compile in VS 2013 but I keep getting the same error no matter what I do:
error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::system_category(void)"
The OGRE SDK comes with the boost library. Unfortunatly it is not compatible with VS2013 so I've downloaded the last version compiled using VS2013. You can find it here
The "additional Include Directories" and "additional Library Directories" are properly setup.
The error state that you are using a symbol that is declared, but not implemented, boost::system::error_category is a method of boost, that various libraries use when managing errors, it belong to the system library, the implementation of this method is in [BOOST_ROOT]\boost\libs\system\src\error_code.cpp.
The most probably cause is that your are including the OGRE's library or part of the library that include some boost's libraries that use this method.
A lot of libraries from boost are header only, but this specific library system are not, it need compilation of this .cpp: two possible fixes are compiling an .LIB or .DLL from boost (see Prepare to Use a Boost Library Binary for more info about this) and using this in your project (could be better if you would be using a lot of libraries from boost that are not header only) or the most easy fix: including the error_code.cpp file in your project and compiling again.

ImageMagick static compilation with another project gives linker errors

I've downloaded the ImageMagick source, compiled the wizard to create a Visual Studio solution for static linkage, and included the static library Magick++ project in my sample project (code below). I've also added a dependency on that project and included the .lib file in the solution, nothing helps.
#include <Magick++.h>
int main()
{
Magick::Image image;
bool test = image.isValid();
return 0;
}
This gives several linker errors, such as:
unresolved external symbol "__declspec(dllimport) public: virtual __thiscall Magick::Image::~Image(void)" (__imp_??1Image#Magick##UAE#XZ) referenced in function _main
Why can't it find the implementation?
I'm using Visual Studio 2010 Beta 2.
The problem may rise from that you are using different compiler than the library was compiled with. As your compiler is fairly new, it's very likely it uses different name mangling and can't find method signatures inside the library.
The answer to linking the ImageMagick static libraries is to ensure you link ALL the dependant static libraries as well!
Once you have compiled the solution for ImageMagick static libraries, go to the 'VisualMagick' folder (within the ImageMagick cloned repository) then to to the 'lib' folder there you will see all the _DB_.lib and _RL_.lib files for Debug and Release.
You need to include those names in the 'Additional Dependencies' section for both Release and Debug.
You must also ensure you have the Library folder path in the 'Additional Library Directories' for both Release and Debug.
Another key aspect is to ensure the libraries are built by the same compiler for the same platform architecture as your own application .. (WIN32 or x64).
This error is strange - The compiler is looking for a function from a DLL (__declspec(dllimport)). Are you sure you are using the right header files ?