Linking FreeImage VS2013 - visual-studio-2013

Have been trying to link FreeImage to with Visual Studio Express 2013 and getting little stuck, have followed
Building & Linking FreeImage with Visual Studio Express 2013
and problem with having to include seems to been fixed with update FreeImage.
Have downloaded and extracted Lib, .h, and DLL and linked in VS but still getting LNK2019.
In solution folder is simple folders named lib + inc and linked in options
C/C++ - Additional Include Directories - .\inc
linker - general - additional lib directories - .\lib
and the DLL is in the folder with the .exe
Any help would be greatly appreciated
Rick

Ok found solution, well work around. Rather than linking the lib's etc myself by using NuGet was able to get FreeImage up and running. If only all things could have such a simple answer.
Any further details about how to get it working by linking the headers and lib etc would still be great help for future lib's i may need to link.
https://www.nuget.org/packages/freeimage/

Related

I need to create a sample video to visualize how HaarCascade works on OpenCV (code do not works)

How are you?
I am trying to create a video like this:
https://youtu.be/L0JkjIwz2II
or like this:
https://youtu.be/hPCTwxF0qf4
I am trying to getting this code working:
https://github.com/Tubeliar/HAARCascadeVisualization
I am using Visual Studio 2017 on Windows 10.
I have added correctly the include directory and the library directory.
I created it as a console application.
I added the #include "stdafx.h" at the start of the main file.
This are the errors that Microsoft Visual Studio show to me:
Can you help me solve this?
There is anything that I should know for making this work correctly?
Thank you to everyone,
Andrea
Those errors are as has been noted indeed linker errors. If the compiler does not complain that means you have you include paths set up correctly, so you have won half the battle.
For linker errors you can try these things:
Make sure your *.lib files are built for the same target you're building your own project for.
If you use NuGet then you can look in the /packages folder of your project. Browse down to /packages/[package name]/build/native/lib/[architecture]/. There you will find folders like v120 or v140. For Visual Studio 2017 they need to be v141. If they are missing then you can tell VS to target the older platform (project properties -> general -> platform toolset)
If you've built the libraries yourself then maybe you did that similarly targeting a different platform? Try building the OpenCV library again and make sure the target is set to v141 (or whatever you want to use).
Make sure the linker can find your libraries. If you're using NuGet this step isn't necessary but if you built the library yourself or if you downloaded a prebuilt one then go into project settings and:
Go to VC++ directories -> Library Directories, edit that value and make sure the folder that contains the *.lib files is in there.
Go to Linker -> Input -> Additional Dependencies, edit it and put in all the *.lib files. Just their names, not full paths. In your case you'd just put opencv_world331d.lib there.
Be aware that any of the above settings need to be done for each configuration. Usually there is a x86 and x64 architecture combined with debug or release configuration. If you switch any of these you'd have to check the above steps again. This is a bit of a hassle so you're better off defining a property sheet once which you can then reuse every time you do a OpenCV project. There was a tutorial for this in OpenCV 2.4's documentation, and some people have made premade ones.

OpenCV : Difficulty in working with cvBlobs Library

I am a beginner in OpenCV2.3 on Windows7 and Visual Studio2010 and finding a tough time(confused rather due to several version available in google) in installing the blob library. I am aware that there are several posts on SO itself dealing with this question. So, kindly bear with this question. These are the steps that I did.
Downloaded the library from Grossman's blob detection library
Extracted the zipped folder
Created a New Visual Studio 2010 blank project C:\Users\Admin\Documents\Visual Studio 2010\Projects\Blob after reading Link1
Copied the two .cpp files from Step(1) under Source folder and copied the include.h under Header folder in VS2010. Then, I included the Additional Libraries and Other Dependencies which we normally do to run any OpenCV program.
This is where I am lost >> Followed Link2. In my version of Cmake2.8.7 under Where is the source code I have C:/OpenCV2.3/opencv/opencv and under Where to build libraries, I have C:/Users/Shreya/Downloads/OpenCV2.3. What should be done now?
Would be highly grateful for a detailed explanation.

C++, DeviL, Opengl and msvs2010 - It compiles and links, but cant load entry point in dll

I am trying to use the DevIl image library in Windows in my project, using MSVS2010. I have downloaded the sdk "DevIL 1.7.8 SDK for 32-bit Windows" from http://openil.sourceforge.net/download.php and put in a folder where all my others libraries are. I have configured my project to include its headers and to link with the .lib provided. I have copied the dll provided to the folder my .exe is. It compiles and links with no problem but when i try to execute it i have an error popup saying something like "procedure entry point _ilGetData#0 could not be located in DevIl.dll" (translation from spanish). I have followed the same steps as in all libraries i am using with no problems, so i donĀ“t know where the problem is.
Thanks for you help.
I believe the problem is that the binaries were built with an older version of Visual Studio... you may have to build the library yourself.

Breakpoint not hooked up when debugging in VS 2008 sp1

My project has a lot of static library (with sources).
Some base libraries can't be breakpointed because the source code is different from the original version.
I know I can workaround if I turn off "Require source files to exactly match the original version" option, but that warning makes me worry.
Is it Microsoft Visual Studio 2008 bug?
I heard it happen when checksum of source code is different with obj.
I have all sources of library and linked as static library,
I cleaned and rebuilt all, but warning never disappeared.
What a worse is, when I turn off "Require source files to exactly match the original version" option, watch windows can't show what member variable has with this error "FIX: CXX0033 Error in OMF Type from Forward Class Declaration"
http://support.microsoft.com/kb/131147/en-us?fr=1
I searched stack overflow and find several similar article (http://stackoverflow.com/questions/163133/breakpoint-not-hooked-up-when-debugging-in-vs-net-2005) but those couldn't help me.
Environment :
Windows 2003 server x64
Visual Studio 2008 sp1 Version 9.0.30729.1 SP
Thanks in advance.
Double check your symbols and sources search paths to ensure they include the right folders with the static library. Check that y7ou are linking the .lib and the .obj files from the right directory. Also, break in program under the debugger, and check where are the symbols for the library loaded from - they should be from the same folder the .obj and the .lib came from.

Adding libraries to Visual Studio problem

Can someone link me a good guide for using libraries in a c or c++ project?
Right now I'm trying to add OpenCV to a newly created project. I've added all the directories I can think of in "Project and Solutions -> VC++ Directories" and to make sure I've dragged and dropped all the .lib and .dll files into the project.
The project builds but when I run the simple "Hello, World program" it gives me this error message:
"cv.exe unable to locate component.
This application has failed to start because cv200.dll was not found. Re-installing the application may fix this problem."
How can I really add this cv200.dll? I've dragged&dropped it into the project..
Thanks!
You need to make sure that cv200.dll is in the DLL search path at run time. The easiest way to do this is to put it in the same directory as the built executable. Dragging and dropping a DLL or LIB file into your project has no effect.
MSDN has a good description of the full DLL search order when loading libraries at runtime.
By default during installation OpenCV create env. variable path \bin.
All dll assumed to be in that dir. However you are using OpenCV 2.0, and OpenCV 2.0 installation doesn't include lib and dll files for Visual Studio. You seems already built all dll's and lib's. If you installed OpenCV correctly just move all dll's into \bin (for example C:\Program Files\OpenCV\bin)
If for some reason you are missing some dll or libs here is instruction how to build them
http://mirror2image.wordpress.com/2009/10/20/switching-to-opencv-2-0-with-vs2005/

Resources