Page 1 of 1

Working with ImageMagick on VS2010 [SOLVED]

Posted: 2011-05-06T06:05:46-07:00
by HunteX
Hi! I configured ImageMagick under C++ (added the path to the header, libs, added the names of libraries in additional dependencies). Trying to run a simple project with Visual Studio 2010 VC++ (ImageMagick's libraries compiled as x64 and the project is configured as x64)

This example is taken from the official site:

Code: Select all

1.  #include <Magick++.h> 
2.  using namespace std; 
3.  using namespace Magick; 
4.  int main(int argc,char **argv) 
5.  { 
6.      InitializeMagick(*argv);
7.      Image image( "100x100", "white" ); 
8.      image.pixelColor( 49, 49, "red" ); 
9.      image.write( "red_pixel.png" ); 
10.    return 0; 
11. }
The problem occurs on line 9:
Image

Error message (translated):
Unhandled exception at "0x000007fef0981426" in "ImageMagicTest2.exe": 0xC0000005: Access violation reading "0xffffffffffffffff".
p.s. a similar problem with the function read () ...

Sincerely, Andrew

UPDATED: I changed Debug to Release