Page 1 of 1

simple program problem! help me.

Posted: 2007-05-29T05:30:20-07:00
by honof1111
I have a strange problem. I have written a simple program to open a image. but when it run I receive an exception


Unhandled exception at 0x100239a5 in testImage.exe: 0xC0000005: Access violation writing location 0xcdb96d7c.


my program

Code: Select all

#include <iostream>

#include <Magick++.h> 

using namespace std; 
using namespace Magick; 
int main(int argc,char **argv) 
{ 
	// Read GIF file from disk 
	Image image;
	//image.read("pippo.jpg");

	try { 
		// Read a file into image object 
		image.read("pippo.jpg"); 
	} 
	catch( Exception &error_ ) 
	{ 
		std::cout << "Caught exception: " << error_.what() << endl; 
		return 1; 
	}

	return 0; 
}


Re: simple program problem! help me.

Posted: 2007-05-29T06:39:30-07:00
by magick
Go to c:/Program Files/ImageMagick-6.3.4/Magick++_Demos. Fire up the button workspace, compile and run. Assuming it runs, use the button workspace as a template for your own project. Most likely your program will run without complaint.