Page 1 of 1

Problem with xstring using Magick::Image::read(string)

Posted: 2013-01-15T03:56:28-07:00
by miqui0287
Hi all!

I'm trying to use Magick++ on VS2010 (I'm working on window seven).
I have configurated my visual project, linking the following library (CORE_RL_Magick++_.lib, CORE_RL_magick_.lib, CORE_RL_wand_.lib, X11.lib, Xext.lib) and pasting all necessary dll in my project directory.

I would like to start with a simple code like this:

Code: Select all

#include <iostream>
#include "include\Magick++.h"

int main(int argc, char** argv){

	Magick::InitializeMagick(*argv);

	Magick::Image my_image;
	
	my_image.read("wizard.jpg");

       return 1;
}
My app is built sucessfully, but when I start it, the line (my_image.read("wizard.jpg");) throws me an execption about access violation and my debugger ends in xstring file.

I don't know if it's really about xstring, but I would like to know if I'm doing wrong or if somebody has solution.

Thanks for your replies.

M.

Re: Problem with xstring using Magick::Image::read(string)

Posted: 2013-01-15T04:29:56-07:00
by magick
You need a starting point, go to c:\Program Files\ImageMagick-6.8.1-Q16\Magick++_demos. Click on the button workspace, build, and run. Assuming that's successful, use the button workspace as a template for your own custom code.

Re: Problem with xstring using Magick::Image::read(string)

Posted: 2013-01-15T06:16:50-07:00
by miqui0287
Thank magick for your fast reply!

I tried to work with button.dsp as you advised me, but it seems I get some compatibility problems.
When I open this file into Visual Studio 2010 Express edition, it asks me to convert the project because it's a VS 6 one. But when I do convert the file, nothing opens...
(Just to be clear, when you talk about workspace, you talk about dsp files or dsw files ? Whatever I tried the two and I had the same compatibility problems).

Do you have heard about the same problem ?
Does it exists those demo files for VS 2010 ?

Thanks you.

M.

Re: Problem with xstring using Magick::Image::read(string)

Posted: 2013-01-15T06:19:16-07:00
by magick
We tried the button workspace with VS2010 just now. It converted the workspace without complaint and the build and execution worked.

Re: Problem with xstring using Magick::Image::read(string)

Posted: 2013-01-15T06:27:47-07:00
by miqui0287
I guess, you are using a full version of Visual Studio 2010.

Mine, it's just express.
I'm going to try a full version, and see what'll happen.

Thank for your avaibility.

M.

Re: Problem with xstring using Magick::Image::read(string)

Posted: 2013-01-15T08:57:27-07:00
by miqui0287
I tried to open and build the button workspace on a full version of MS2010 and it does run !
I can now enjoy the power of Magick++.

Thanks you!

M.