[Solved] Unable to compile windows 6.7.6-4

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
markmarques
Posts: 88
Joined: 2010-06-29T14:36:09-07:00
Authentication code: 8675308

[Solved] Unable to compile windows 6.7.6-4

Post by markmarques »

Just to report that I am unable to compile ImageMagick in Windows...

At first I thought that the problem was VStudio8 ( 2005 ) ...
Updated it to VStudio 2010 ... Same problem ...
I am getting the files from the main repository in
"http://www.imagemagick.org/download/windows/"
dated with 04-04-2012...

After cleaning the VS solution I get 4424 errors , ranging from "gzio.c" , "jdphuff.c" to "tiff.h" and "tiffio.h" ...

Regarding the configure util ( it compiles correctly ) I did not change anything ...
My idea to compile IM is to enable HDRI mode plus FFT lib ...

But even with the plain IM I did not get very far ... :(
Nonetheless I was able to compile the 6.7.0 version in the past ...
Last edited by markmarques on 2012-04-10T03:29:07-07:00, edited 1 time in total.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Unable to compile windows 6.7.6-4

Post by magick »

We can compile with both VS2008 and VS2010 without complaint. We'll need more information before we can help you. We assume you read http://www.imagemagick.org/script/advan ... lation.php?
markmarques
Posts: 88
Joined: 2010-06-29T14:36:09-07:00
Authentication code: 8675308

Re: Unable to compile windows 6.7.6-4

Post by markmarques »

Yes...
I did read the previous document ... and I even did compile the 6.7.0 or so IM version ...
for instance I get this : ( no matter being in VS2005 or VS2010 )

Error 1 error C2143: syntax error : missing ')' before '->' D:\ImageMagick-source\zlib\gzio.c 503 1 CORE_zlib

I get several errors ( 4424) ...
So something is broken .... :(
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Unable to compile windows 6.7.6-4

Post by magick »

It seems so. We get no compile errors when we ask VS2010 to compile the entire ImageMagick distribution (MagickCore, MagickWand, Magick++, jpeg, png, etc). Are you using the full release version of VS2010? Or perhaps a limited VS2010 version?
markmarques
Posts: 88
Joined: 2010-06-29T14:36:09-07:00
Authentication code: 8675308

Re: [Solved] Unable to compile windows 6.7.6-4

Post by markmarques »

After some serious cleanup I am now able to compile correctly IM 6.7.6-4 correctly ...
Thanks for the fast help ...

Changing subject:
how can I verify if IM is using the JP2 jpeg library or the conventional one ?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: [Solved] Unable to compile windows 6.7.6-4

Post by fmw42 »

markmarques wrote:After some serious cleanup I am now able to compile correctly IM 6.7.6-4 correctly ...
Thanks for the fast help ...

Changing subject:
how can I verify if IM is using the JP2 jpeg library or the conventional one ?
convert -list configure

look for JP2 vs jpg (or both) in the line starting with DELEGATES

If you have JP2 and want to convert an image to it, use

convert image JP2:result.jp2
hcllc
Posts: 1
Joined: 2012-05-15T13:16:38-07:00
Authentication code: 13

Re: [Solved] Unable to compile windows 6.7.6-4

Post by hcllc »

I downloaded ImageMagick-6.7.6-9.zip from the Windows section of the downloads at to fix the ssize_t VS2010 problem I encountered with previous releases. Went through the configure, but not without problems. VS2010 converted the distributed .sln to 2010 format, after which BUILD had problems with the LINKER output not going to the same place as Targetpath. So I fixed project properties manually to make linker and target the same - configure then compiled successfully (I changed to 16 bit color) , and VisualDynamicMT.sln was created when I executed configure.exe. Running ALL from this created solution ALSO required "conversion", --and-- the resulting .sln encountered MANY of the same target/linker mismatches - like the one shown here:
_______________________
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\Projects\ImageMagick-6.7.6\VisualMagick\magick\..\lib\CORE_magick.dll) does not match the Linker's OutputFile property value (C:\Projects\ImageMagick-6.7.6\VisualMagick\bin\CORE_RL_magick_.dll). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(992,5): warning MSB8012: TargetName(CORE_magick) does not match the Linker's OutputFile property value (CORE_RL_magick_). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
Link:
Creating library ..\lib\CORE_RL_magick_.lib and object ..\lib\CORE_RL_magick_.exp
CORE_magick_mt_dll.vcxproj -> C:\Projects\ImageMagick-6.7.6\VisualMagick\magick\..\lib\CORE_magick.dll
___________________
(there are more of these than I care to correct manually - configure was just one project tile, w/3 "adjustments" - but this step covers MANY projects that each will require correction)
This linker problem (I think is the cause, anyway - maybe not??) led to other problems later into the process, like this:
___________________
LINK : fatal error LNK1181: cannot open input file 'CORE_RL_magick_.lib'
Build FAILED.
_____________________________

So, no build...
VS2010 SP1 "Premium", Win 7 SP1+ patch Tuesdays since.
User avatar
rmabry
Posts: 148
Joined: 2004-04-13T11:25:27-07:00

Re: [Solved] Unable to compile windows 6.7.6-4

Post by rmabry »

I'm trying to build the latest IM for Windows (on Windows 7 using VS 10) and get warnings right off the bat with the build of configure.exe, matching the previous post by hcllc. Specifically, there is this: "TargetPath [snip] does not match the Linker's OutputFile property value [snip]" (see near the end of the following output).

Code: Select all

1>------ Rebuild All started: Project: configure, Configuration: Release Win32 ------
1>  stdafx.cpp
1>  _WIN32_WINNT not defined. Defaulting to _WIN32_WINNT_MAXVER (see WinSDKVer.h)
1>  WaitDlg.cpp
1>  _WIN32_WINNT not defined. Defaulting to _WIN32_WINNT_MAXVER (see WinSDKVer.h)
1>  configure.cpp
1>  _WIN32_WINNT not defined. Defaulting to _WIN32_WINNT_MAXVER (see WinSDKVer.h)
1>  configure_wizard.cpp
1>  _WIN32_WINNT not defined. Defaulting to _WIN32_WINNT_MAXVER (see WinSDKVer.h)
1>  finished_page.cpp
1>  _WIN32_WINNT not defined. Defaulting to _WIN32_WINNT_MAXVER (see WinSDKVer.h)
1>  system_page.cpp
1>  _WIN32_WINNT not defined. Defaulting to _WIN32_WINNT_MAXVER (see WinSDKVer.h)
1>  target_page.cpp
1>  _WIN32_WINNT not defined. Defaulting to _WIN32_WINNT_MAXVER (see WinSDKVer.h)
1>  welcome_page.cpp
1>  _WIN32_WINNT not defined. Defaulting to _WIN32_WINNT_MAXVER (see WinSDKVer.h)
1>  Generating Code...
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\ImageMagick-6.8.0\VisualMagick\configure\.\Release\configure\configure.exe) does not match the Linker's OutputFile property value (C:\ImageMagick-6.8.0\VisualMagick\configure\configure.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
1>  configure.vcxproj -> C:\ImageMagick-6.8.0\VisualMagick\configure\.\Release\configure\configure.exe
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

But configure.exe nevertheless is built in the configure directory. After executing with the usual defaults, I bravely go ahead and try to build All. I get a ton more warnings (MSB8012, as above) of impending linker troubles (along with lots of other cursing). The last few lines of the report show a failure!

Code: Select all

151>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(992,5): warning MSB8012: TargetName(UTIL_IMDisplay) does not match the Linker's OutputFile property value (IMDisplay). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
151>  UTIL_IMDisplay_mt_exe.vcxproj -> C:\ImageMagick-6.8.0\VisualMagick\win2k\IMDisplay\..\..\bin\UTIL_IMDisplay.exe
========== Rebuild All: 149 succeeded, 1 failed, 1 skipped ==========
A search for a previous instance of the word "failed" fails to find one. So I don't know which 1 of the 150 failed.

A quick check in the bin folder ... tons of stuff there, all brand new. Execute identify.exe ... it works and tells me the correct version number. I correctly convert a file.

So, lots of scary messages but it seems to work so far. I'll be back as soon as I try and fail to build PerlMagick...

Rick
User avatar
rmabry
Posts: 148
Joined: 2004-04-13T11:25:27-07:00

Re: [Solved] Unable to compile windows 6.7.6-4

Post by rmabry »

Okay, I have tried and failed to build PerlMagick, as promised. The trouble is the same as this old thing:

viewtopic.php?f=3&t=16946&p=63366

So meet me there if you're interested.

Rick
Post Reply