Page 1 of 1
Configuring Magick++ For Visual C++ Express 2008
Posted: 2009-01-19T12:44:14-07:00
by angelod101
I've downloaded the ImageMagick source and followed the instructions for installing and configuring the Magick++ API. When I try to build the configure project for Visual C++ Express 2008 I get an error related to the MFC Library. The compiler tells me "Cannot open include file afxwin.h", the reference is within the file stdafx.h. After research I found that afxwin.h is part of the MFC Library and from what I gather is not included in Visual C++ 2008 Express or is available for download, it only comes with the professional version of Visual Studio. Does anyone know if this is true? Am I able to use the Magick++ API from a Visual C++ 2008 EE project and how do I configure it? Is MFC a requirement for Magick++ or just the configure project? I can't seem to find any documentation on this anywhere. Thanks.
Re: Configuring Magick++ For Visual C++ Express 2008
Posted: 2009-01-19T13:09:37-07:00
by magick
The configure project is the only application that requires MFC. You should not need to build it since the Windows distribution of ImageMagick includes a pre-built configure.exe application that you can run to generate the Visual Studio workspace to build ImageMagick. We have had a number of reports that ImageMagick builds with the express releases of Visual Studio.
Re: Configuring Magick++ For Visual C++ Express 2008
Posted: 2009-01-19T15:30:45-07:00
by angelod101
Thanks for the help. I ran configure.exe and the wizard told me it would create a project that targeted VC++ 7.0(2003). I'm currently using VC++ 2008 (9.0) but there was no option for 9.0. When I opened the project in VC++ 2008 visual studio asked if I wanted to convert the project because it was created in an older version of visual studio. I allowed it to convert it and when I try to build the project I'm getting the same error about not finding 'afxwin.h'.
Re: Configuring Magick++ For Visual C++ Express 2008
Posted: 2009-01-19T17:23:50-07:00
by magick
ImageMagick does not call afxwin.h. Can you remove the dependency? We have never used the express compiler but have had several reports it works-- in fact we got a report just yesterday.
Re: Configuring Magick++ For Visual C++ Express 2008
Posted: 2009-01-20T06:23:41-07:00
by angelod101
It seems the reference is in "ImageMagick-6.4.8\win2k\IMDisplay\stdafx.h". I tried commenting out the line that includes afxwin.h in that file but the next include reference in the file gave me an error. I tried commenting out those and I got more reference errors. What are my other choices as far as c++ compilers? All I would like to do is use ImageMagick to convert PDF to JPGs on a scheduled basis using Windows Scheduler. I'm going to use one directory for reading the PDFs and another for writing the converted JPGs. Would it be easier for me to do this with a batch file via command line? Thanks for all the help.
Re: Configuring Magick++ For Visual C++ Express 2008
Posted: 2009-01-20T06:56:59-07:00
by magick
Other options are to download and install the pre-compiled ImageMagick Windows binaries from
http://www.imagemagick.org/script/binar ... hp#windows, build under MinGW / Msys or build everything in ImageMagick with the Visual C++ Express compiler except IMDisplay.
As far as using ImageMagick you can use a batch file, use the command line, use ImageMagickObject from ASP, use ImageMagick for .NET, use IMagick for PHP, etc.
Re: Configuring Magick++ For Visual C++ Express 2008
Posted: 2009-01-20T09:14:09-07:00
by angelod101
Thanks again for the help. I'm just going to use command line so I can get this done and out of the way. I'm having difficulties converting a pdf via command line in win32. I have the windows binary installed because if I enter convert into the command line i get all of IM's available options. What should the win32 command consist of if i simply want to convert a single pdf stored in one directory to a jpg image created in a different directory without resizing or changing the name?
Re: Configuring Magick++ For Visual C++ Express 2008
Posted: 2009-01-20T09:48:31-07:00
by magick
Ensure you have Ghostscript installed otherwise ImageMagick will be unable to render your PDF's. To convert, try this command:
You can include relative paths as your file name to move the output to another folder. If you have additional questions, move to the Users forum. This forum is for ImageMagick development.