MagickNET compiling questions

ImageMagickObject is a Windows COM+ interface to ImageMagick. COM+, Visual Basic, and Delphi users should post to this discussion group.
Post Reply
rsborn

MagickNET compiling questions

Post by rsborn »

I have imageMagick version 6.4.6 successfully compiling on Visual Studio 2005 and now am trying to compile magickNET so it contains the runtimes statically. According to the instructions, you need to make a change to MagickCore.h so it will recognize the MAGICK_STATIC_LINK definition. THis change was already here for me so I assume it was added to baseline (dangerous to assume I know but I did not go and search changelogs).

I have all of this working and magickNET compiles successfully but it is only 168k which I know means it did not include the imagMagick libraries. If I use this DLL in a C# project, it will work but only as long as I have copied all of the imageMagick binaries to the same directory.

Has anyone been able to successfully get this to work. Mick has a compiled version on his site that is a little over 3 meg, I just can't figure out how to get it to happen from source and I would like to be able to compile my whole project from source and not depend on someone elses DLL.

Thanks for any help anyone can provide, I have read a bunch of articles and docs but none of the suggestions so far have worked for me.

Thanks,
Rick
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: MagickNET compiling questions

Post by magick »

The default build is a multi-threaded DLL. Check the build multi-threaded static checkbox when you run the configure program. That should allow you to statically link it against MagickNet.
rsborn

Re: MagickNET compiling questions

Post by rsborn »

Yes, I noticed that while running the configure program but the author was very specific about needing the multithreaded DLL while compiling imageMagick even though we are seemingly compiling it statically into a .NET assembly. I don't really understand this which is why I thought it would be nice to latch onto this already done work. After reading your post I decided to try the multithreaded Static and I got hundreds of linker errors which I suspect is the reason he needed this compiled dynamically.

I will keep playing around a bit and hopefully midi_mick reads this and responds. The library really does work excellently, I have it working in a windows app as long as I copy the imagemagick binaries to the same directory as the magickNET dll, and his compiled version also works well, I just don't like to depend on non official binary releases.

Here is the link to his docs about compiling, I do notice in the project files he has on his site, we has a solution file called VisualStaticMTDLL.sln so maybe that is the way I need to do this. I did not use his project files since they were compiled for 6.3.1

http://midimick.com/magicknet/magickDoc.html

Anyway, thank you so much for the super quick answer, if I get this working I will be sure to write it up som hopefully it will help someone else later on.
PQSIK

Re: MagickNET compiling questions

Post by PQSIK »

Hi rsborn

I'm trying to compile imagemagick files into one DLL also and was wondering if you managed to do it.
If so can you tell know how you did it.

Thanks.

PQSIK
Post Reply