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

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
miqui0287
Posts: 10
Joined: 2013-01-15T03:36:03-07:00
Authentication code: 6789

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

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post 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.
miqui0287
Posts: 10
Joined: 2013-01-15T03:36:03-07:00
Authentication code: 6789

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

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post by magick »

We tried the button workspace with VS2010 just now. It converted the workspace without complaint and the build and execution worked.
miqui0287
Posts: 10
Joined: 2013-01-15T03:36:03-07:00
Authentication code: 6789

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

Post 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.
miqui0287
Posts: 10
Joined: 2013-01-15T03:36:03-07:00
Authentication code: 6789

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

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