spnda / fastgltf

A modern C++17 glTF 2.0 library focused on speed, correctness, and usability
https://fastgltf.readthedocs.io/v0.8.x/
MIT License
275 stars 42 forks source link

Doesn't work with /SUBSYSTEM:WINDOWS and #include <windows.h> #39

Closed senorsenorjunior closed 9 months ago

senorsenorjunior commented 9 months ago

Still a bit of a C++ noob and so I'm not sure if this is a bug or not but for whatever reason as soon as I switch my application to /SUBSYSTEM:WINDOWS and include "windows.h" with WIN32_LEAN_AND_MEAN defined a bunch of errors pop up in Visual Studio Code 2022. It works fine when the app is set to /SUBSTEM:CONSOLE though.

Sorry in advance if this is a stupid question, I tried and failed to find some info online about it. :)

spnda commented 9 months ago

Well "a bunch of errors" is not descriptive. The library is a few thousand lines of C++ and itself hard to pinpoint what could cause this. Could you please paste all the errors here (or sth like pastebin) so that I can scan through and find the issue.

senorsenorjunior commented 9 months ago

Sorry for not being very descriptive, I ended up realizing I forgot to add #define NOMINMAX and after adding that it solved the problem