Page 1 of 1

Problem compiling IM 6.5.3 using MSVC6

Posted: 2009-06-21T07:36:46-07:00
by angryxpeh
I was trying to compile ImageMagick 6.5.3-10 using Microsoft Visual Studio 6 and received following error:

--------------------Configuration: CORE_magick - Win32 Debug--------------------
Compiling...
nt-base.c
MagickCore lib DLL export interface
MagickCore module DLL export interface
C:\prj\ImageMagick-6.5.3\magick\nt-base.c(514) : error C2065: 'HCRYPTPROV' : undeclared identifier
C:\prj\ImageMagick-6.5.3\magick\nt-base.c(514) : error C2146: syntax error : missing ';' before identifier 'handle'
C:\prj\ImageMagick-6.5.3\magick\nt-base.c(514) : error C2065: 'handle' : undeclared identifier
C:\prj\ImageMagick-6.5.3\magick\nt-base.c(517) : error C2143: syntax error : missing ';' before 'type'
C:\prj\ImageMagick-6.5.3\magick\nt-base.c(519) : error C2064: term does not evaluate to a function
C:\prj\ImageMagick-6.5.3\magick\nt-base.c(520) : error C2065: 'status' : undeclared identifier
C:\prj\ImageMagick-6.5.3\magick\nt-base.c(520) : warning C4013: 'CryptAcquireContext' undefined; assuming extern returning int
C:\prj\ImageMagick-6.5.3\magick\nt-base.c(520) : error C2065: 'MS_DEF_PROV' : undeclared identifier
C:\prj\ImageMagick-6.5.3\magick\nt-base.c(520) : error C2065: 'PROV_RSA_FULL' : undeclared identifier
C:\prj\ImageMagick-6.5.3\magick\nt-base.c(521) : error C2065: 'CRYPT_VERIFYCONTEXT' : undeclared identifier
C:\prj\ImageMagick-6.5.3\magick\nt-base.c(521) : error C2065: 'CRYPT_MACHINE_KEYSET' : undeclared identifier
C:\prj\ImageMagick-6.5.3\magick\nt-base.c(524) : error C2065: 'CRYPT_NEWKEYSET' : undeclared identifier
C:\prj\ImageMagick-6.5.3\magick\nt-base.c(527) : warning C4013: 'CryptGenRandom' undefined; assuming extern returning int
C:\prj\ImageMagick-6.5.3\magick\nt-base.c(530) : warning C4013: 'CryptReleaseContext' undefined; assuming extern returning int
Error executing cl.exe.

All - 11 error(s), 3 warning(s)

Re: Problem compiling IM 6.5.3 using MSVC6

Posted: 2009-06-21T08:12:45-07:00
by magick
In nt-base.c, change line 512 to
  • #if defined(MAGICKCORE_CIPHER_SUPPORT) && defined(_MSC_VER) && (_MSC_VER > 1200)
Let us know if that works for you.

Re: Problem compiling IM 6.5.3 using MSVC6

Posted: 2009-06-21T08:48:29-07:00
by angryxpeh
Yes, it works, thanks.
However, there's still a problem with PerlMagick, I filed another bug there: viewtopic.php?f=7&t=14041