TheBuzzSaw
TheBuzzSaw

Reputation: 8826

Can mingw be used to compile code for Windows Vista or 7?

I noticed that the included headers for Windows development (such as Windows.h) are essentially for Windows XP and older. I am unable to call functions such as GetTickCount64 because they require Windows Vista or higher. I have Windows 7, but these functions are still absent. I understand that linking to such functions would increase the requirements on my program, and I am OK with that.

Does anyone have any experience with this? Can I use the newer Win32 API with mingw? How?

Upvotes: 2

Views: 708

Answers (1)

David Heffernan
David Heffernan

Reputation: 612954

You can always download the very latest platform SDK and have all you need. Use the header and lib files from the SDK.

Having said that, it may be that all you need to do is to define _WIN32_WINNT and/or WINVER to 0x0600 or higher to gain access to more recent APIs. Off the top of my head, I'm not sure what Windows header file mingw ships with.

Upvotes: 6

Related Questions