REGoth-project / REGoth

OpenSource-Reimplementation of the zEngine, used by the game "Gothic"
GNU General Public License v3.0
631 stars 62 forks source link

allow building on/for macos #225

Closed Drako closed 7 years ago

Drako commented 7 years ago

including utils/Utils.h pulled in HandleDef.h containing the Handle namespace. glfw3native.h includes some macos headers though, which #define Handle.

As PlatformGLFW does not really need the entirety of utils/Utils.h I just forward declared the one function that is actually called.

This makes REGoth compilable on MacOS. I still need to fix runtime issues though, but these fixes may happen in following pull requests :)

markusobi commented 7 years ago

Part of this is my doing, I put some REGoth specific function into Utils (Utils::findSuggestion) that pulls in a lot of REGoth headers via #include <logic/Console.h>. I guess I should move that function elsewhere.

markusobi commented 7 years ago

I had to revert commit 6a5ba7ca695f613e4d5e527fa11ab99e9ee18b25 on master, because the game crashed on Linux at game startup.

Drako commented 7 years ago

this is weird. I wonder how linux would identify as OS X here.

Drako commented 7 years ago

okay, got the solution... it should have been #if instead of #ifdef

Drako commented 7 years ago

should I make a new PR for this change or can you just fix it?

markusobi commented 7 years ago

I'll fix it on master. (I didn't really think it through, I should have asked myself why it did affect Linux at all)