Page 1 of 1

Simply does not compile under VS 2013

Posted: 2014-11-10T12:09:38-07:00
by Hawkeye
I have downloaded the source code and followed the directions exactly, yet the Windows build fails to compile successfully under VS 2013.
The include paths generated in the solution/projects do not align with the directory structure on disk.

Do you have a distribution where this actually works?

Windows 7
VS 2013

Thanks-

Hawkeye-

I get thousands of lines of errors like this. Even though the .h files exist, they are not found by the compiler.


(note I tried 6.8.9-10 first, but it failed with the same errors).

c:\users\me\work\imagemagick\imagemagick-6.8.9-7\lcms\src\lcms2_internal.h(31): fatal error C1083: Cannot open include file: 'lcms2_plugin.h': No such file or directory
5> cmscgats.c
2>..\..\ffi\src\closures.c(33): fatal error C1083: Cannot open include file: 'ffi.h': No such file or directory
2> debug.c
5>c:\users\me\work\imagemagick\imagemagick-6.8.9-7\lcms\src\lcms2_internal.h(31): fatal error C1083: Cannot open include file: 'lcms2_plugin.h': No such file or directory
2>..\..\ffi\src\debug.c(25): fatal error C1083: Cannot open include file: 'ffi.h': No such file or directory
5> cmscnvrt.c
2> prep_cif.c
4> bzlib.c
1> infback.c
5>c:\users\me\work\imagemagick\imagemagick-6.8.9-7\lcms\src\lcms2_internal.h(31): fatal error C1083: Cannot open include file: 'lcms2_plugin.h': No such file or directory
5> cmserr.c
2>..\..\ffi\src\prep_cif.c(26): fatal error C1083: Cannot open include file: 'ffi.h': No such file or directory
7>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets(942,5): warning MSB8027: Two or more files with the name of ftdebug.c will produce outputs to the same location. This can lead to an incorrect build result. The files involved are ..\..\ttf\builds\windows\ftdebug.c, ..\..\ttf\src\base\ftdebug.c.
2> raw_api.c
1> inffast.c
5>c:\users\me\work\imagemagick\imagemagick-6.8.9-7\lcms\src\lcms2_internal.h(31): fatal error C1083: Cannot open include file: 'lcms2_plugin.h': No such file or directory
4> compress.c
5> cmsgamma.c
2>..\..\ffi\src\raw_api.c(29): fatal error C1083: Cannot open include file: 'ffi.h': No such file or directory
2> types.c
1> inflate.c
3> jaricom.c
5>c:\users\me\work\imagemagick\imagemagick-6.8.9-7\lcms\src\lcms2_internal.h(31): fatal error C1083: Cannot open include file: 'lcms2_plugin.h': No such file or directory
2>..\..\ffi\src\types.c(31): fatal error C1083: Cannot open include file: 'ffi.h': No such file or directory
2> ffi.c

<snip/>

Re: Simply does not compile under VS 2013

Posted: 2014-11-13T17:23:10-07:00
by snibgo
I know nothing about Visual Studio. IM compiles fine with Cygwin under Windows 8.1.

Re: Simply does not compile under VS 2013

Posted: 2014-11-14T04:48:05-07:00
by magick
We tested Visual Studio 2013 today and ImageMagick 6.9.0 compiled and linked without complaint.

Re: Simply does not compile under VS 2013

Posted: 2014-12-30T11:10:01-07:00
by dez
Sorry to revive an old thread... I am also having trouble compiling using VS2013. I am testing version 6.9.0-0. I am trying to compile using command line tools in order to automate building ImageMagick as a part of a much larger build process.

The commands I am using are:
From the VisualMagick/configure directory I run: configure.exe /noWizard /mtd /8
This command doesn't exit cleanly (even if I build the configure.sln)... I trap and ignore the bad exit code.

I then cd .. and run: UpgradeToVS2012.cmd
Which results in: Migration completed successfully, but some warnings were detected during migration. I can post the UpgradeLog.htm file if that is helpful.

Then I run: MSBuild VisualDynamicMT.sln /property:Configuration=Release

This fails with the following output:

Project "C:\third_party\emsng_build\sandbox\ImageMagick-win32-6.9.0-0\VisualMagick\All\All.vcxproj" (2) is building "C:\third_party\emsng_build\sandbox\ImageMagick-win32-6.9.0-0\VisualMagick\filters\analyze_mt_dll.vcxproj" (150) on node 1 (default targets).
PrepareForBuild:
Creating directory "..\Release\analyze\".
Creating directory "..\Release\analyze\analyze.tlog\".
InitializeBuildStatus:
Creating "..\Release\analyze\analyze.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files\Microsoft Visual Studio 12.0\VC\bin\CL.exe /c /I..\.. /I..\..\xlib /I..\..\Magick++\lib /I..\..\ /I..\..\magick /Zi /nologo /W4 /WX- /MP /Ox /Ob2 /Oy /D NDEBUG /D _WINDOWS /D WIN32 /D _VISUALC_ /D NeedFunctionPrototypes /D _DLL /D _WINDLL /D _MBCS /GF /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /openmp /Fo"..\Release\analyze\\" /Fd"..\Release\analyze\vc120.pdb" /Gd /TC /analyze- /errorReport:queue ..\..\filters\analyze.c
analyze.c
MagickCore lib DLL import interface
MagickCore module DLL export interface
Link:
C:\Program Files\Microsoft Visual Studio 12.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"..\bin\analyze.dll" /INCREMENTAL:NO /NOLOGO /LIBPATH:..\lib\ /MACHINE:X86 CORE_RL_magick_.lib CORE_RL_wand_.lib kernel32.lib user32.lib gdi32.lib odbc32.lib odbccp32.lib ole32.lib oleaut32.lib winmm.lib wsock32.lib advapi32.lib urlmon.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"..\bin\analyze.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /BASE:"0x67fa0000" /DYNAMICBASE /NXCOMPAT /IMPLIB:"..\lib\analyze.lib" /MACHINE:X86 /SAFESEH /DLL ..\Release\analyze\analyze.obj
"C:\third_party\emsng_build\sandbox\ImageMagick-win32-6.9.0-0\VisualMagick\lib\CORE_RL_magick_.lib"
LINK : fatal error LNK1181: cannot open input file 'CORE_RL_wand_.lib' [C:\third_party\emsng_build\sandbox\ImageMagick-win32-6.9.0-0\VisualMagick\filters\analyze_mt_dll.vcxproj]
Done Building Project "C:\third_party\emsng_build\sandbox\ImageMagick-win32-6.9.0-0\VisualMagick\filters\analyze_mt_dll.vcxproj" (default targets) -- FAILED.

[..... snip .....]

LINK : fatal error LNK1181: cannot open input file 'CORE_RL_wand_.lib' [C:\third_party\emsng_build\sandbox\ImageMagick-win32-6.9.0-0\VisualMagick\filters\analyze_mt_dll.vcxproj]

40 Warning(s)
1 Error(s)



However, when I open VisualDynamicMT.sln in the IDE, it does indeed compile as expected. *shrug*

Any assistance is appreciated.

--
Dez.

Re: Simply does not compile under VS 2013

Posted: 2014-12-30T12:10:49-07:00
by dlemstra
Have you tried executing the following before you run msbuild?

Code: Select all

call "%vs120comntools%vsvars32.bat"
I also specify the platform when I build Magick.NET but I don't think you need to do that. The fact that configure.exe crashes is also odd. It works perfectly on my machine.

p.s. You should use /Q8 instead of just /8.

Re: Simply does not compile under VS 2013

Posted: 2014-12-30T12:34:55-07:00
by dez
Sorry, that was a typo, the script does indeed do /Q8.

And yes, I do call vsvars32.bat...

configure.exe doesn't crash, it just exits with non zero exit status. Which gets caught as Inappropriate IO control or something like that.

Re: Simply does not compile under VS 2013

Posted: 2014-12-30T12:56:47-07:00
by dlemstra
UpgradeToVS2012.cmd upgrades the project to Visual Studio 2012. We don't have a script that upgrades the project to Visual Studio 2013. Maybe you need to open the project first in VS2013? I am planning on refactoring configure.exe to make it create the project files for different Visual Studio version. We won't need the scripts then anymore the Visual Studio version will probably become a command line argument.

Re: Simply does not compile under VS 2013

Posted: 2014-12-30T13:06:08-07:00
by dez
the .sln opens in vs2013 just fine and doesn't prompt to upgrade after running the vs2012 script. The only part that doesn't compile is the analyze_mt bit. The rest compiles fine. And all of it compiles fine in vs2013 if I open the .sln and use the configuration manager to build a release build. Just odd that it doesn't work from command line.