Magick++ for Visual Studio 2015 tutrial

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
main_coder
Posts: 2
Joined: 2016-09-30T08:48:53-07:00
Authentication code: 1151

Magick++ for Visual Studio 2015 tutrial

Post 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.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Magick++ for Visual Studio 2015 tutrial

Post 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 ?
snibgo's IM pages: im.snibgo.com
main_coder
Posts: 2
Joined: 2016-09-30T08:48:53-07:00
Authentication code: 1151

Re: Magick++ for Visual Studio 2015 tutrial

Post 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?
NetJohn
Posts: 8
Joined: 2016-09-24T21:02:07-07:00
Authentication code: 1151

Re: Magick++ for Visual Studio 2015 tutrial

Post 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
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Magick++ for Visual Studio 2015 tutrial

Post 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.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Post Reply