Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Needs windows.h #4638

Closed
snibgo opened this issue Dec 29, 2021 · 5 comments
Closed

Needs windows.h #4638

snibgo opened this issue Dec 29, 2021 · 5 comments

Comments

@snibgo
Copy link

snibgo commented Dec 29, 2021

ImageMagick version

7.1.0-19

Operating system

Windows

Operating system, version and so on

Windows 8.1, with Cygwin toolchain

Description

I'm trying to build IM v7.1.0-19, on a Windows 8.1 laptop, with Cygwin.

One problem was that "make" failed at MagickCore/nt-feature.c with messages like:

warning: implicit declaration of function 'GetLogicalDrives'
error: unknown type name 'HKEY'
error: unknown type name 'LONG'
error: unknown type name 'DWORD'
error: 'KEY_READ' undeclared

An older version of IM, v7.0.8-64, in MagickCore/nt-feature.c, had the line "#include <windows.h>". That line seems to have been removed. Inserting that line into MagickCore/nt-feature.c fixes that problem.

Steps to Reproduce

Use Cygwin tools: automake, autoconf, ./configure, make.

Fails at "make".

Images

No images.

@dlemstra
Copy link
Member

I will take a look at it this weekend.

@dlemstra
Copy link
Member

dlemstra commented Jan 3, 2022

Do you also need these two defines?:

#define WIN32_LEAN_AND_MEAN
#define VC_EXTRALEAN

The windows.h header file should already be included from the studio.h file so I don't understand why I would need to restore this.

@snibgo
Copy link
Author

snibgo commented Jan 16, 2022

Sorry, I have only just seen your reply:

Do you also need these two defines?

I don't also need those. Including windows.h is sufficient.

I did a "git clone" of IM today, and the make failed again with the same messages. "#include <windows.h>" fixed the problem.

@FuzzyBunnys
Copy link

I have had the same issue as snibgo, following his advice on a separate thread I was able to successfully build ImageMagick after adding the line he specified

@dlemstra
Copy link
Member

@urban-warrior pushed some patches to restore this for Cygwin and this should be resolved in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants