Page 1 of 1

Magick++ for Visual Studio 2015 tutrial

Posted: 2016-09-30T09:42:54-07:00
by main_coder
Is there some tutorial or video on how to set up simple win32 console app with static libs ?

I've build Visual Magich config tool, then build MTD libs for x86 system.
I've create simple win 32 console app. Set proper path for "Additional Library Directories" and "Additional Include Directories"
Set all libs to Linker's "Additional Dependencies"

My code:

Code: Select all

#include "stdafx.h"
#include "Magick++.h"

using namespace std;
using namespace Magick;

int main( int argc, char ** argv )
{
	InitializeMagick( *argv );
	system( "pause" );
    return 0;
}
And I always have error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl Magick::InitializeMagick(char const *)" (__imp_?InitializeMagick@Magick@@YAXPBD@Z) referenced in function _main

What may be wrong here?

Please help.

Re: Magick++ for Visual Studio 2015 tutrial

Posted: 2016-09-30T12:19:40-07:00
by snibgo
I haven't seen any IM/VS tutorials. Have you seen about "Additional Dependencies" in the recent thread viewtopic.php?f=23&t=30295 ?

Re: Magick++ for Visual Studio 2015 tutrial

Posted: 2016-09-30T13:50:52-07:00
by main_coder
Yes. I'm finally build it but only with the release libs from installed package ImageMagick-7.0.3-1-Q16-x86-dll.exe
CORE_RL_Magick++_.lib;CORE_RL_MagickCore_.lib;CORE_RL_MagickWand_.lib

So I'm not sure is it proper to work with release version of libs under debug configuration of my project?

Re: Magick++ for Visual Studio 2015 tutrial

Posted: 2016-10-02T09:37:59-07:00
by NetJohn
You can't debug an IM-based program at all in VS C++, lots of bad things happen.

If there is a way, please let me know.

John

Re: Magick++ for Visual Studio 2015 tutrial

Posted: 2016-10-02T12:06:41-07:00
by dlemstra
Did you build the debug version of ImageMagick from source? I can debug IM from anther library without any problems as long as I use a debug build.