-
Notifications
You must be signed in to change notification settings - Fork 10
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
Windows header compatibility problem (LogLevel ERROR) #98
Comments
Hej there, and thanks for reporting this! I'd be happy to accommodate your needs, however I can't simply change the enum member name without breaking existing code. I'd propose the following alternative: I can add a special CMake option or preprocessor directive to enable a new Windows compatibility mode (e.g. Are there any other incompatibilities you have noticed? Lmk if this works for you :) |
That would probably work. But i did just manage to remove my d3d header files from loader code, so maybe this is not necessary after all. My code now runs successfully with ZenKit header file included but i have yet to actually write some ZenKit code. Ill get back to you if i find anything else. |
Btw. i had a little bit of trouble with setting up CMake: A) B)
I fixed this by just adding this to my own CMake: |
Hm as for A), that's a side product of the way libsquish is bundled with ZenKit and ZenLib. Ideally, I'd use To solve B) I'd need the CMake configure output (i.e. the output produced by CMake before building) from a fresh cache (i.e. clear the CMake cache, then reconfigure). Generally it should work just find with both |
B) I already cloned all submodules for ZenKit but that did not help fix the error. |
Regarding windows.h, it did not manage to separate my code strictly into d3d and loader, and doing so is not possible with my current architecture i think. However, for now this workaround seems to do the trick:
|
Hi,
i am currently trying to migrate from ZenLib to ZenKit, but i have some problems with the headers. My renderer is DirectX only. It is also a bit chaotic with header includes (m basically including d3d headers everywhere so i can quickly implement things), like this:
(Yes im using both modern DX as well as old DX SDK, but problem is the same when only using modern DX.)
However, d3d headers include some windows headers like
wingdi.h
. This cannot be changed without fully removing d3d headers. They depend on constants/macros inwingdi.h
so i cannot useNOGDI
preprocessor flag.wingdi.h
has the following line:#define ERROR 0
This conflicts with ZenKit's logging in
Logger.h
:So basically this is my fault for not having very clean separation between asset loading and direct3d code. However maybe you would be willing to change the
ERROR
value (g3log for example usesFATAL
) so ZenKit can be used easily with windows-heavy code?If not i can understand that.
The text was updated successfully, but these errors were encountered: