Hello all,
I can't build IM using mingw because of many link errors
undefined reference to :
* _imp__MogrifyImages
* _imp_MogrifyImageInfo
* _imp__AcquireWandId
and many others (I can post all the messages if you want).
I've also noticed these warnings :
"xxxx is defined after prior declaration as dllimport : attribute ignored"
Does this warning implies my problems ?
Has anybody successfully built IM with mingw as shared libraries, and how ? (I successfully built it as static lib, but that doesn't have any interest for me). What can I do to make this work ?
thanks in advance.
ps : I try to compile IM 6.3.3, under Win XP ;
./configure --without-perl --enable-shared
make
pps : do I have to separately compile libjpeg, libpng, etc. or are there inside IM ?
MinGW : building IM
Re: MinGW : building IM
In fact, it seems that libtool doesn't know how to build a Windows DLL correctly. That's the core of the matter.
Re: MinGW : building IM
I had some success on building ImageMagick using MinGW. But I'm not using MSYS or Cygwin. I imported the generated Visual C++ workspace and project files into CodeBlocks project files. I have five DLLs build successfully so far.
I'm having some problems to include external libraries (such as Ghostscript) on the ImageMagick sources, but I'm sure when I solve this problem everything will build well.
If you want the CodeBlocks project files and instructions, please tell me.
Daniel
I'm having some problems to include external libraries (such as Ghostscript) on the ImageMagick sources, but I'm sure when I solve this problem everything will build well.
If you want the CodeBlocks project files and instructions, please tell me.
Daniel
Re: MinGW : building IM
Thank you for your answer. I think your idea could concern me. Can you send me your C::B projects file, or just tell me the way through the (very) curious road of "using IM under Windoz" ?
Thank you again.
Thank you again.
Re: MinGW : building IM
Here is the file (http://br.geocities.com/poa_1996/MagickBlocks.zip). Just unzip it inside the VisualMagick folder of your IM windows sources, and all project files will go automatically to their respective folders.
Then, open the "VisualDynamicMT.workspace" file inside a recent nightly build (http://forums.codeblocks.org/index.php/board,20.0.html) of CodeBlocks, and click on the menu Build->Build Workspace. That's all ! The MinGW compiler will build the DLLs.
Remember, I'm still getting some error about the external libraries. If someone knows how to improve it, please help.
Then, open the "VisualDynamicMT.workspace" file inside a recent nightly build (http://forums.codeblocks.org/index.php/board,20.0.html) of CodeBlocks, and click on the menu Build->Build Workspace. That's all ! The MinGW compiler will build the DLLs.
Remember, I'm still getting some error about the external libraries. If someone knows how to improve it, please help.
Re: MinGW : building IM
We downloaded the latest release of ImageMagick under the MSYS shell and ImageMagick compiled without complaint as follows:
- bunzip -c ImageMagick-6.3.7-2.tar.bz2 | tar xvf -
cd ImageMagick-6.3.7
./configure --disable-shared
make
make -k -i install
convert logo: logo.miff
identify -verbose logo.miff
Re: MinGW : building IM
Greetings!
I' m a spanish user and newbie in your forum. Sorry for my english.
I am very interested in Building IM with MinGW and the "--enable-shared" flag on too.
I want to give you any new info (with my weak forces) about this problem.
In my case, I have not a internal error with the compiler. Mi compiler is "gcc.exe (GCC) 4.2.1-dw2 (mingw32-2) and the final output (with ImageMagick-6.3.7-2) is:
/bin/sh ./libtool --silent --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./config -I.. -I. -I.. -I../Magick++/lib -D_DLL -D_MT -g -O2 -Wall -W -c -o wand/animate.lo ../wand/animate.c
In file included from ../magick/MagickCore.h:178,
from ../wand/MagickWand.h:138,
from ../wand/studio.h:243,
from ../wand/animate.c:42:
../magick/module.h:67: warning: 'dllexport' attribute ignored
../wand/animate.c: In function 'AnimateImageCommand':
../wand/animate.c:212: error: 'AnimateImageCommand': definition is marked as dllimport
../wand/animate.c:211: warning: unused parameter 'argc'
../wand/animate.c:211: warning: unused parameter 'argv'
make: *** [wand/animate.lo] Error 1
Perhaps this can be useful...
I' m a spanish user and newbie in your forum. Sorry for my english.
I am very interested in Building IM with MinGW and the "--enable-shared" flag on too.
I want to give you any new info (with my weak forces) about this problem.
In my case, I have not a internal error with the compiler. Mi compiler is "gcc.exe (GCC) 4.2.1-dw2 (mingw32-2) and the final output (with ImageMagick-6.3.7-2) is:
/bin/sh ./libtool --silent --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./config -I.. -I. -I.. -I../Magick++/lib -D_DLL -D_MT -g -O2 -Wall -W -c -o wand/animate.lo ../wand/animate.c
In file included from ../magick/MagickCore.h:178,
from ../wand/MagickWand.h:138,
from ../wand/studio.h:243,
from ../wand/animate.c:42:
../magick/module.h:67: warning: 'dllexport' attribute ignored
../wand/animate.c: In function 'AnimateImageCommand':
../wand/animate.c:212: error: 'AnimateImageCommand': definition is marked as dllimport
../wand/animate.c:211: warning: unused parameter 'argc'
../wand/animate.c:211: warning: unused parameter 'argv'
make: *** [wand/animate.lo] Error 1
Perhaps this can be useful...
Re: MinGW : building IM
Ups! I forgot to say you that my environment is MinGW/mSYS, Windows XP, etc
Besides, "make install" has a little glitch...
$ make install
make[1]: Entering directory `/home/Administrador/ImageMagick-6.3.7/buildnoshared'
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
/bin/sh ./libtool --silent --mode=install /bin/install -c 'magick/libMagick.la' '/usr/local/lib/libMagick.la'
/bin/sh ./libtool --silent --mode=install /bin/install -c 'wand/libWand.la' '/usr/local/lib/libWand.la'
/bin/sh ./libtool --silent --mode=install /bin/install -c 'Magick++/lib/libMagick++.la' '/usr/local/lib/libMagick++.la'
test -z "/usr/local/bin" || /bin/mkdir -p "/usr/local/bin"
/bin/sh ./libtool --silent --mode=install /bin/install -c 'utilities/animate.exe' '/usr/local/bin/animate.exe'
/bin/sh ./libtool --silent --mode=install /bin/install -c 'utilities/compare.exe' '/usr/local/bin/compare.exe'
/bin/sh ./libtool --silent --mode=install /bin/install -c 'utilities/composite.exe' '/usr/local/bin/composite.exe'
/bin/sh ./libtool --silent --mode=install /bin/install -c 'utilities/conjure.exe' '/usr/local/bin/conjure.exe'
/bin/sh ./libtool --silent --mode=install /bin/install -c 'utilities/convert.exe' '/usr/local/bin/convert.exe'
/bin/sh ./libtool --silent --mode=install /bin/install -c 'utilities/display.exe' '/usr/local/bin/display.exe'
/bin/sh ./libtool --silent --mode=install /bin/install -c 'utilities/identify.exe' '/usr/local/bin/identify.exe'
/bin/sh ./libtool --silent --mode=install /bin/install -c 'utilities/import.exe' '/usr/local/bin/import.exe'
/bin/sh ./libtool --silent --mode=install /bin/install -c 'utilities/mogrify.exe' '/usr/local/bin/mogrify.exe'
/bin/sh ./libtool --silent --mode=install /bin/install -c 'utilities/montage.exe' '/usr/local/bin/montage.exe'
/bin/sh ./libtool --silent --mode=install /bin/install -c 'utilities/stream.exe' '/usr/local/bin/stream.exe'
test -z "/usr/local/bin" || /bin/mkdir -p "/usr/local/bin"
/bin/install -c 'magick/Magick-config' '/usr/local/bin/Magick-config'
/bin/install -c 'Magick++/bin/Magick++-config' '/usr/local/bin/Magick++-config'
/bin/install -c 'wand/Wand-config' '/usr/local/bin/Wand-config'
test -z "C:\\mSYS\\local\\lib\\ImageMagick-6.3.7\\modules-Q16\\coders\\" || /bin/mkdir -p "C:\\mSYS\\local\\lib\\ImageMagick-6.3.7\\modules-Q16\\coders\\"
/bin/mkdir: cannot create directory `C:\\mSYS\\local\\lib\\ImageMagick-6.3.7\\modules-Q16\\coders': No such file or directory
make[1]: *** [install-codersLTLIBRARIES] Error 1
make[1]: Leaving directory `/home/Administrador/ImageMagick-6.3.7/buildnoshared'
make: *** [install-am] Error 2
It seems It has been unable to create the path... However It's possible to install it "manually".
Besides, "make install" has a little glitch...
$ make install
make[1]: Entering directory `/home/Administrador/ImageMagick-6.3.7/buildnoshared'
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
/bin/sh ./libtool --silent --mode=install /bin/install -c 'magick/libMagick.la' '/usr/local/lib/libMagick.la'
/bin/sh ./libtool --silent --mode=install /bin/install -c 'wand/libWand.la' '/usr/local/lib/libWand.la'
/bin/sh ./libtool --silent --mode=install /bin/install -c 'Magick++/lib/libMagick++.la' '/usr/local/lib/libMagick++.la'
test -z "/usr/local/bin" || /bin/mkdir -p "/usr/local/bin"
/bin/sh ./libtool --silent --mode=install /bin/install -c 'utilities/animate.exe' '/usr/local/bin/animate.exe'
/bin/sh ./libtool --silent --mode=install /bin/install -c 'utilities/compare.exe' '/usr/local/bin/compare.exe'
/bin/sh ./libtool --silent --mode=install /bin/install -c 'utilities/composite.exe' '/usr/local/bin/composite.exe'
/bin/sh ./libtool --silent --mode=install /bin/install -c 'utilities/conjure.exe' '/usr/local/bin/conjure.exe'
/bin/sh ./libtool --silent --mode=install /bin/install -c 'utilities/convert.exe' '/usr/local/bin/convert.exe'
/bin/sh ./libtool --silent --mode=install /bin/install -c 'utilities/display.exe' '/usr/local/bin/display.exe'
/bin/sh ./libtool --silent --mode=install /bin/install -c 'utilities/identify.exe' '/usr/local/bin/identify.exe'
/bin/sh ./libtool --silent --mode=install /bin/install -c 'utilities/import.exe' '/usr/local/bin/import.exe'
/bin/sh ./libtool --silent --mode=install /bin/install -c 'utilities/mogrify.exe' '/usr/local/bin/mogrify.exe'
/bin/sh ./libtool --silent --mode=install /bin/install -c 'utilities/montage.exe' '/usr/local/bin/montage.exe'
/bin/sh ./libtool --silent --mode=install /bin/install -c 'utilities/stream.exe' '/usr/local/bin/stream.exe'
test -z "/usr/local/bin" || /bin/mkdir -p "/usr/local/bin"
/bin/install -c 'magick/Magick-config' '/usr/local/bin/Magick-config'
/bin/install -c 'Magick++/bin/Magick++-config' '/usr/local/bin/Magick++-config'
/bin/install -c 'wand/Wand-config' '/usr/local/bin/Wand-config'
test -z "C:\\mSYS\\local\\lib\\ImageMagick-6.3.7\\modules-Q16\\coders\\" || /bin/mkdir -p "C:\\mSYS\\local\\lib\\ImageMagick-6.3.7\\modules-Q16\\coders\\"
/bin/mkdir: cannot create directory `C:\\mSYS\\local\\lib\\ImageMagick-6.3.7\\modules-Q16\\coders': No such file or directory
make[1]: *** [install-codersLTLIBRARIES] Error 1
make[1]: Leaving directory `/home/Administrador/ImageMagick-6.3.7/buildnoshared'
make: *** [install-am] Error 2
It seems It has been unable to create the path... However It's possible to install it "manually".