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

Improve building with mingw-w64 #326

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

Martchus
Copy link
Contributor

@Martchus Martchus commented Jan 22, 2023

  • Fix configuration and compilation problems with mingw-w64
  • See particular commit messages for details
  • I haven't been able to link a build successfully as configuration with my static build of FluidSynth doesn't work yet

…der Linux

The filesystem on Linux is case-sensitive so we need to get the casing
right when compiling on Linux for Windows.
Apparently FTGL's CMake find module does not pull in the include path for
FreeType 2 headers automatically. So we need to do that manually on our
own. This code is relying on pkg-config for finding the include path. As
pkg-config has been intentionally avoided for Windows builds I only enabled
this for mingw-w64 builds so far (where pkg-config is usually available).
Using `using namespace std;` is a bad practice, especially in header files
as it can lead to name collisions. In this case `std::byte` (from C++ 17)
collided with `typedef unsigned char byte` (from the Windows header
`rpcndr.h`) leading to many build errors.
* Link against FluidSynth at all (not sure how the Windows build has with
  FluidSynth enabled has ever been working without actually linking to the
  FluidSynth's library)
* The imported target of FluidSynth does not automatically make the targets
  it depends on available. So we need to find the according packages
  manually.
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.

1 participant