Magick++ - Visual Studio installation problem
Re: Magick++ - Visual Studio installation problem
Download the ImageMagick Windows binary distribution. Move to the c:\Program Files\ImageMagick\Magick++_Demos folder and click on the button workspace. Build and run. You can now build ImageMagick yourself and use the button workspace to ensure you have the proper workspace settings.
Re: Magick++ - Visual Studio installation problem
I've spent last four days on trying make Magick++ library work and 've got nothing... i copied the *.h's and all the *.c's to include folder of VS2005... i've built configure.sln and i'm not sure if that did anything... furthermore i built VisualDynamicMT.dsw and VisualStaticST.dsw so whole bunch of dlls and pdb were created so again i copied all the files and pasted to bin folder of VisualStudio2005... still nothing, I don't know if I have to do something with the linker every time i wanna make project that uses Magick++? And one more thing... you say that i have a workspace that i can use as a template but which workspace is it and where its created ? Thank you in advantage for trying to solve my problem of the day. Peace!
EDIT:
I forgot to add this is as a result:
1>VeryFirst.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::Geometry::~Geometry(void)" (__imp_??1Geometry@Magick@@QAE@XZ)
1>VeryFirst.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::Geometry::Geometry(unsigned int,unsigned int,unsigned int,unsigned int,bool,bool)" (__imp_??0Geometry@Magick@@QAE@IIII_N0@Z)
EDIT2:
Allright the unresolved external symbol error is gone, i copied names of all libs and pasted into Configuration Properties > Linker > Input and Additional Dependencies so the linker knows which libs it has to look for I guess.
So now the project compiles which made me happy as hell, but now i've got a problem while running a program. Here's what it says:
Unhandled exception at 0x7c812afb in VeryFirst.exe: Microsoft C++ exception: Magick::ErrorBlob at memory location 0x0012fa84..
The program stops when I initialize an object
or read ready file
anybody knows what else do I have to do to solve this problem? here's some of code
EDIT:
I forgot to add this is as a result:
1>VeryFirst.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::Geometry::~Geometry(void)" (__imp_??1Geometry@Magick@@QAE@XZ)
1>VeryFirst.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::Geometry::Geometry(unsigned int,unsigned int,unsigned int,unsigned int,bool,bool)" (__imp_??0Geometry@Magick@@QAE@IIII_N0@Z)
EDIT2:
Allright the unresolved external symbol error is gone, i copied names of all libs and pasted into Configuration Properties > Linker > Input and Additional Dependencies so the linker knows which libs it has to look for I guess.
So now the project compiles which made me happy as hell, but now i've got a problem while running a program. Here's what it says:
Unhandled exception at 0x7c812afb in VeryFirst.exe: Microsoft C++ exception: Magick::ErrorBlob at memory location 0x0012fa84..
The program stops when I initialize an object
Code: Select all
Image master("100x100","white");
Code: Select all
master.read("konrafal.jpg")
Code: Select all
int main(int argc,char ** argv)
{
InitializeMagick(*argv);
//Image image( "c:\8-cell-simple.gif" );
Image master("100x100","white");
//image.write( "red_pixel.png" );
master.display();
}
Re: Magick++ - Visual Studio installation problem
Download the ImageMagick Windows binary distribution. Move to the c:\Program Files\ImageMagick\Magick++_Demos folder and click on the button workspace. Replace the button source code with your source code. Build and run. It should work without complaint. The button workspace has all the settings you need to build a custom Magick++ project.
Re: Magick++ - Visual Studio installation problem
If you say so, that means that I have some problems that differ from settings in VisualStudio cause that doesnt work as well. I mean it compiles but then there is an error which says:The button workspace has all the settings you need to build a custom Magick++ project.
Code: Select all
Unhandled exception at 0x7c915233 in button.exe: 0xC0000005: Access violation writing location 0x00030ffc.
EDIT:
Allright then, now it's two weeks since I started my strugle with Magick++. I realy need to make it work this week and please somebody help me with my problem. Please somebody tell me how do I have to built configure.sln in release or debug? And after that what to choose between these options:
and below that which options have checked?-Dynamic Multi-threaded DLL runtimes
-Static Single-threaded runtimes
-Static Multi-threaded runtimes
-Static Multi-threaded DLL runtimes
Just for the record: I've read all the readme's and used the workspace as was said and nothing, all I've got is that my projects compiles but when I aproach any of the functions from Magick++ library there's an unhandled expection which was mentioned above. Can anyone help me with this?-Decorate exe files with build options
-include all demo, test, appl, and contrib directiories
-generate all utility projects with full paths rather then relative paths
-generate Visual Studio 7 format
Re: Magick++ - Visual Studio installation problem
I don't know if you've solved your problem or moved on but I was having the exact same problem.
I've figured it out!... Sortof.
There are a set of preprocessor definitions that need to be added.
In your project properties->Configuration Properties->C/C++->Preprocessor set the "Preprocessor Definitions" to:
NDEBUG
WIN32
_CONSOLE
_VISUALC_
NeedFunctionPrototypes
_DLL
_MAGICKMOD_
This was a direct copy paste from the demo projects so I'm not quite sure what's going on.
It is working now though! I can access and create new pictures.
Hope this helps.
P.s. If someone understands what those preprocessor definitions are doing please explain. Thank you!
I've figured it out!... Sortof.
There are a set of preprocessor definitions that need to be added.
In your project properties->Configuration Properties->C/C++->Preprocessor set the "Preprocessor Definitions" to:
NDEBUG
WIN32
_CONSOLE
_VISUALC_
NeedFunctionPrototypes
_DLL
_MAGICKMOD_
This was a direct copy paste from the demo projects so I'm not quite sure what's going on.
It is working now though! I can access and create new pictures.
Hope this helps.
P.s. If someone understands what those preprocessor definitions are doing please explain. Thank you!
Re: Magick++ - Visual Studio installation problem
Glad you made it work, I had as well. But tell me have you ever run your program succesfully on other PC than yours with Magick++ working fine?
Re: Magick++ - Visual Studio installation problem
I've never moved the Visual Studio project accross to another machine. I only use Visual Studio at home and use Linux at University.
The source code compiled and ran fine on both systems though.
Surprisingly not all of my new projects work with the exact same preprocessor commands put in and others do without any change. The wonders of modern technology...
The source code compiled and ran fine on both systems though.
Surprisingly not all of my new projects work with the exact same preprocessor commands put in and others do without any change. The wonders of modern technology...