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

Windows fixes #72

Merged
merged 8 commits into from
Apr 13, 2023
Merged

Conversation

Quipyowert2
Copy link
Contributor

This pull request has some changes that made the code work better with Visual Studio and refactor some code that uses non-standard stuff like private GCC namespaces and __attribute__. Also, there is a workaround for microsoft/vcpkg#2292 included.

I'll make a separate pull request for the VS project files.

This way the game can compile on other compilers like Clang, MSVC,
Intel, etc.
Visual Studio's compiler, cl.exe, generates slightly different mangled
names for `struct Foo` and `class Foo`, causing linker errors.
Visual Studio gets confused by `__attribute__((noreturn))`.
fseek() was crashing with invalid argument. The FILE* couldn't be
passed from Globulation 2 to the vorbisfile library because vorbisfile
and globulation 2 were linked to different versions of the C runtime.
On 64-bit Windows, DWORD_PTR and DWORD are different sizes, and this
causes an error with GCC 12 on MSYS2 Mingw64 on Windows 10.
@Quipyowert2
Copy link
Contributor Author

Oops, I accidentally left the variable length array commit in there by mistake. That commit tried to fix the VLA error in Visual Studio but made the declaration much uglier.

@stephanemagnenat
Copy link
Contributor

Looks good to me, merging.

@stephanemagnenat stephanemagnenat merged commit eb7857d into Globulation2:master Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants