mingw IM6.8.6-9 IsWow64Process undefined reference

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
mhck
Posts: 4
Joined: 2013-09-16T14:36:08-07:00
Authentication code: 6789

mingw IM6.8.6-9 IsWow64Process undefined reference

Post by mhck »

I found an old post saying this was fixed a while back. However, when I compile IM 6.8.6-9 I first get a warning:

Code: Select all

magick/nt-base.c: In function 'NTIs64BitPlatform':
magick/nt-base.c:1021:3: warning: implicit declaration of function 'IsWow64Process' [-Wimplicit-function-declaration]
   return(IsWow64Process(GetCurrentProcess(), &is64) && is64);
   ^
and then an error:

Code: Select all

CCLD     magick/libMagickCore-6.Q16.la
magick\\.libs\\magick_libMagickCore_6_Q16_la-nt-base.o: In function `NTIs64BitPlatform':
C:\msys\1.0\local\src\ImageMagick-6.8.6-9/magick/nt-base.c:1021: undefined reference to `IsWow64Process'
collect2.exe: error: ld returned 1 exit status
I checked to make sure IsWow64Process exists:

Code: Select all

user@W7PC /mingw/include
$ grep -r -i "IsWow64Process" *.h
winbase.h:WINBASEAPI BOOL WINAPI IsWow64Process(HANDLE,PBOOL);

user@W7PC /mingw/lib
$ grep -r -i "IsWow64Process" *.a
Binary file libkernel32.a matches
I apologize in advance for being a bit of a mingw n00b. Thanks.


To follow up... I performed a 'make clean', './configure --without-perl', and 'make'
This time, the error changed:

Code: Select all

  CCLD     utilities/animate.exe
libtool: link: warning: library `c:/gnuwin32/lib/libpng12.la' was moved.
libtool: link: warning: library `c:/gnuwin32/lib/libpng12.la' was moved.
utilities/animate.o: In function `AnimateMain':
C:\msys\1.0\local\src\ImageMagick-6.8.6-9/utilities/animate.c:81: undefined reference to `_imp__MagickCoreGenesis'
C:\msys\1.0\local\src\ImageMagick-6.8.6-9/utilities/animate.c:82: undefined reference to `_imp__AcquireExceptionInfo'
C:\msys\1.0\local\src\ImageMagick-6.8.6-9/utilities/animate.c:83: undefined reference to `_imp__AcquireImageInfo'
C:\msys\1.0\local\src\ImageMagick-6.8.6-9/utilities/animate.c:84: undefined reference to `_imp__AnimateImageCommand'
C:\msys\1.0\local\src\ImageMagick-6.8.6-9/utilities/animate.c:84: undefined reference to `_imp__MagickCommandGenesis'
C:\msys\1.0\local\src\ImageMagick-6.8.6-9/utilities/animate.c:86: undefined reference to `_imp__DestroyImageInfo'
C:\msys\1.0\local\src\ImageMagick-6.8.6-9/utilities/animate.c:87: undefined reference to `_imp__DestroyExceptionInfo'
C:\msys\1.0\local\src\ImageMagick-6.8.6-9/utilities/animate.c:88: undefined reference to `_imp__MagickCoreTerminus'
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: mingw IM6.8.6-9 IsWow64Process undefined reference

Post by magick »

We compiled ImageMagick under MinGW without complaint. We're not sure why its failing for you.
mhck
Posts: 4
Joined: 2013-09-16T14:36:08-07:00
Authentication code: 6789

Re: mingw IM6.8.6-9 IsWow64Process undefined reference

Post by mhck »

The IsWow64Process undefined reference error came from restarting the MSYS window and not re-exporting CPPFLAGS and LDFLAGS, i.e.

Code: Select all

export CPPFLAGS="-Ic:/gnuwin32/include"
export LDFLAGS="-Lc:/gnuwin32/lib"
Once I exported, I had to 'make distclean', run './configure --without-perl', and then 'make'.


I'm still trying to figure out the undefined references when building utilities/animate.com. Prior to, I get these warnings:

Code: Select all

*** Warning: This system can not link to static lib archive magick/libMagickCore-6.Q16.la.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.

*** Warning: This system can not link to static lib archive wand/libMagickWand-6.Q16.la.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.

*** Warning: This system can not link to static lib archive /usr/local/src/ImageMagick-6.8.6-9/magick/libMagickCore-6.Q16.la.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.

*** Warning: linker path does not have real file for library -luuid.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libuuid and none of the candidates passed a file format test
*** using a file magic. Last file checked: /mingw/lib/libuuid.a
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.

*** Since this library must not contain undefined symbols,
*** because either the platform does not support them or
*** it was explicitly requested with -no-undefined,
*** libtool will only create a static version of it.
Thanks again for any help!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: mingw IM6.8.6-9 IsWow64Process undefined reference

Post by magick »

Try ./configure --enable-shared. Does not work for you?
mhck
Posts: 4
Joined: 2013-09-16T14:36:08-07:00
Authentication code: 6789

Re: mingw IM6.8.6-9 IsWow64Process undefined reference

Post by mhck »

It does not. I get the same errors with or without './configure --enable-shared'.
Post Reply