Page 2 of 2

Re: Building under MinGW, need step by step guide

Posted: 2007-10-31T09:17:14-07:00
by dannyyy
Hi ! HAPPY HALLOWEEN !!!

I took a shortcut...the only file I really needed was really "wmfconfig.h", so I just renamed the file wmfconfig.h.in which was inside the WMF folder and altered some defines.

Now ImageMagick is compiling perfectly using MinGW and CodeBlocks. Later I will make the files available and write a detailed README.

The only problem I'm having now is about the debug version. On the file "nt-base.h", lines 38 to 40, there is the following:

Code: Select all

#if defined(_DEBUG)
#include <crtdbg.h>
#endif
...but MinGW doesn't has this header. What can I do in this case ?

Oh, and thanks for the help so far !

Re: Building under MinGW, need step by step guide

Posted: 2007-10-31T09:19:23-07:00
by magick
Try changing the conditional compile statement to:
  • #if defined(_DEBUG) && !defined(__MINGW32__)
and let us know if that fixes the problem.

Re: Building under MinGW, need step by step guide

Posted: 2007-10-31T10:21:19-07:00
by dannyyy
It returned the following errors:

Code: Select all

...
...
E:\ImageMagick-6.3.6\magick\magick.c -o ..\Debug\CORE_magick\magick\magick.o
E:\ImageMagick-6.3.6\magick\magick.c: In function `MagickCoreGenesis':
E:\ImageMagick-6.3.6\magick\magick.c:1137: error: `_CRTDBG_REPORT_FLAG' undeclared (first use in this function)
E:\ImageMagick-6.3.6\magick\magick.c:1137: error: (Each undeclared identifier is reported only once
E:\ImageMagick-6.3.6\magick\magick.c:1137: error: for each function it appears in.)
E:\ImageMagick-6.3.6\magick\magick.c:1138: error: `_CRTDBG_CHECK_ALWAYS_DF' undeclared (first use in this function)
E:\ImageMagick-6.3.6\magick\magick.c:1138: error: `_CRTDBG_DELAY_FREE_MEM_DF' undeclared (first use in this function)
E:\ImageMagick-6.3.6\magick\magick.c:1139: error: `_CRTDBG_LEAK_CHECK_DF' undeclared (first use in this function)
Process terminated with status 1 (1 minutes, 18 seconds)
6 errors, 0 warnings
Are those functions VC++ specific ? Or I can find it on the MinGW/GCC headers ?

Re: Building under MinGW, need step by step guide

Posted: 2007-10-31T10:49:31-07:00
by magick
Change the conditional compile in that area to
  • #if defined(_DEBUG) && !defined(__BORLANDC__) && !defined(__MINGW32__)
Sometimes the Windows environment is interpreted in a Visual C context and other times in a Unixy/gcc context. We have not compiled ImageMagick under MinGW lately so you are tripping across a few compatibility issues. Thanks for alerting us to these problems.

Re: Building under MinGW, need step by step guide

Posted: 2007-11-29T18:20:15-07:00
by magick
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
We tried compiling with --enable-shared but an internal compiler error exception was thrown.