Working with ImageMagick on VS2010 [SOLVED]

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
User avatar
HunteX
Posts: 13
Joined: 2011-05-06T05:41:03-07:00
Authentication code: 8675308
Contact:

Working with ImageMagick on VS2010 [SOLVED]

Post 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
Post Reply