Unhandled exception if I try to read or write (WinXP)
Posted: 2008-08-27T09:53:42-07:00
I've had to move to WinXP and am writing some new code. The following seems to work fine:
However, if i try to read from a file or write out to a file, for example by adding this code to the bottom:
I get the following complaint:
0xC0000005: Access violation writing location 0xce168be4.
I presume that if there was some problem linking to the dll or the header, none of the previous lines would have worked, so I'm somewhat stumped as to where I'm going wrong. When I insert these lines into one of the provided demo programs (demo.cpp) it performs as expected.
I'm new to using imagemagick under WinXP, so I've no doubt I've missed some setting or the like. Can anyone enlighten me? I've started comparing all the settings, but since the demo program is set to be a console program and the program I'm using this in is MFC, I can't make all the settings identical.
Code: Select all
Magick::InitializeMagick("C:\Program Files\ImageMagick-6.4.3-Q16");
Magick::Image blank_image("640x480", "white");
blank_image.label("Magick++");
blank_image.pixelColor(50,50,Magick::Color("Red"));
Code: Select all
blank_image.write("out.png");
0xC0000005: Access violation writing location 0xce168be4.
I presume that if there was some problem linking to the dll or the header, none of the previous lines would have worked, so I'm somewhat stumped as to where I'm going wrong. When I insert these lines into one of the provided demo programs (demo.cpp) it performs as expected.
I'm new to using imagemagick under WinXP, so I've no doubt I've missed some setting or the like. Can anyone enlighten me? I've started comparing all the settings, but since the demo program is set to be a console program and the program I'm using this in is MFC, I can't make all the settings identical.