BeRo1985 / pasvulkan

Vulkan header generator, OOP-style API wrapper, framework and prospective Vulkan-based game engine for Object Pascal
zlib License
191 stars 30 forks source link

Delphi 10 compile error - Vulkan.pas line 840 TVkHMONITOR=HMONITOR; #14

Closed milika closed 5 years ago

milika commented 5 years ago

projectmanager build examples or any other project build: C:\Program Files (x86)\Embarcadero\Add\pasvulkan\src\Vulkan.pas(840): error E2003: Undeclared identifier: 'HMONITOR' examples.dpr(46): error F2063: Could not compile used unit 'Vulkan.pas'

Cant find HMONITOR in any of the classes...

Fuehrerstand commented 5 years ago

I'am not sure, but i think, that you have an x64 release of Windows as base.

There are 3 files involved: Vulkan.pas, vk.xml, vkxml2pas.dpr

If i read the lines from the xml, so it seems to be, that the irritation came from x86 under x64. My suggestion is, to check the logic of it and insert/replicate the missing line to the x64 part. If the compiler is on x64 mode, the x86 part would be ignored from top. From theoretics you can switch to x86 mode explicite and if i'am right, it runs and the problem is just a missing line.

Please remind the holy rule: Never touch a running system...

What does it means? Take a look to the history and you will see tons of updates for Win10. And the scene laughs against the best joke ever. "Oh, a new Windows, whats new? New bugs!"

BeRo1985 commented 5 years ago

Neither with Delphi 10.2.3, nor with Delphi 10.3.1, nor with FPC 3.1.1, nor with FPC 3.3.1 I can reproduce the problem with the missing definition of HMONITOR for the both Win32 und Win64 targets. At these compilers HMONITOR is defined each in their Windows.pas / Winapi.Windows.pas.

So I guess you're using a much older Delphi version (which I'm acutally not supporting it), where HMONITOR was still defined in the MultiMon.pas / WinAPI.MultiMon.pas, than instead of how it would be actually right, in the Windows.pas / Winapi.Windows.pas .

Therefore, I will close this issue.

BeRo1985 commented 5 years ago

Can you tell me your Delphi version anyway, so that i could add maybe a IFDEF?