Link error with Visual Studio 2005 (Lnk2001 unresolved external symbol)

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
Aryetis
Posts: 2
Joined: 2018-12-14T03:33:40-07:00
Authentication code: 1152

Link error with Visual Studio 2005 (Lnk2001 unresolved external symbol)

Post by Aryetis » 2018-12-14T03:46:28-07:00

Hello,

I'm trying to use your lib Magick++ (installed from ImageMagick-7.0.8-16-Q16-x64-dll.exe on a Windows 10 x64 computer and using Visual Studio 2005). But unfortunately I cannot compile a single program using Magick++.
For example something as simple as

Code: Select all

#include <stdafx.h>
#include <stdio.h>
#include <stdlib.h>
#include "Magick++.h"
#include "MagickCore/magick-type.h"
#include "MagickCore/methods.h"
#include "MagickCore/exception.h"


int main (int argc, char **argv)
{
	Magick::ExceptionInfo * exception = MagickCore::AcquireExceptionInfo();
	return 0;
}
refuses to compile with the error : error LNK2001: unresolved external symbol __imp__AcquireExceptionInfo MagickLab.obj

I think I followed every step of the Tutorial, I have:
  • Added the "mageMagick\include" folder to my Compiler options (C++ -> General -> "Additional Include Directories" ) for both Release and Debug mode
  • Added the "mageMagick\lib" folder to my Linker options (Linker -> General -> "Additional Include Directories" ) for both Release and Debug mode
  • Added the .lib files (CORE_RL_Magick++_.lib, CORE_RL_MagickCore_.lib, CORE_RL_MagickWand_.lib) to my linker additional dependencies (Linker -> Input -> Additional Dependencies)
  • Set the MD mode for Runtime Library (C++ -> Code Generation -> Runtime Library)
  • I am compiling in Release (even thought this point will probably cause problem when I'll have to import the lib in my project as I obviously wants it to work in debug mode too....)
Yet it refuses to link a simple program. Anyone had similar problems before ? Should I add something to my PATH ?

Thanks for reading.

Aryetis
Posts: 2
Joined: 2018-12-14T03:33:40-07:00
Authentication code: 1152

Re: Link error with Visual Studio 2005 (Lnk2001 unresolved external symbol)

Post by Aryetis » 2018-12-14T04:08:25-07:00

Resolved for now .... It works way better when you install the x32 lib for a x32 project.

Another case of ask and you'll find the asnwer by yourself right away.

Post Reply