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

Compile errors on MinGW #3183

Closed
TheMostDiligent opened this issue May 1, 2020 · 3 comments
Closed

Compile errors on MinGW #3183

TheMostDiligent opened this issue May 1, 2020 · 3 comments
Labels

Comments

@TheMostDiligent
Copy link
Contributor

Version/Branch of Dear ImGui:

Version: 1.77 (WIP)
Branch: master

Back-end/Renderer/Compiler/OS

Back-ends: imgui_impl_win32.cpp + custom engine/back-end
Compiler: x86_64-w64-mingw32-c++.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0
Operating System: Windows

My Issue/Question:

imgui_impl_win32.cpp fails to compile on MinGW/Windows with error at line 408:

...\imgui\examples\imgui_impl_win32.cpp:408:5: error: 'SetProcessDPIAware' was not declared in this scope
     SetProcessDPIAware();
     ^~~~~~~~~~~~~~~~~~
@ocornut
Copy link
Owner

ocornut commented May 4, 2020

I'll see if I can add a fix but you are supposedly to specify a value for _WIN32_WINNT when compiling with Cygwin, otherwise you are compiling for extremely old versions of Windows.

@ocornut
Copy link
Owner

ocornut commented May 4, 2020

Pushed a fix. Note that by default if you don't specify a windows version, MinGW is compiling with 0x503 aka "Windows Server 2003" so you'll be missing various features.
See values https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=vs-2019

@ocornut ocornut closed this as completed May 4, 2020
@TheMostDiligent
Copy link
Contributor Author

Thank you!

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

No branches or pull requests

2 participants