milkytracker / MilkyTracker

An FT2 compatible music tracker
http://milkytracker.github.io/
Other
1.67k stars 160 forks source link

Compiling requires C++11 #310

Closed bratpeki closed 1 year ago

bratpeki commented 1 year ago

When compiling MilkyTracker, using the method explained in INSTALL.md, there is a problem.

Specifically on Linux, when compiling via g++:

/usr/include/rtmidi/RtMidi.h:137:29: note: C++11 ‘noexcept’ only available with ‘-std=c++11’ or ‘-std=gnu++11’

I propose a change in the CMakeLists.txt file that allows for use of C++11.

The change is just one line of code and one comment.

Thank you!

coderofsalvation commented 1 year ago

Thank you for this @bratpeki. Im using this myself as well for a while locally, but the issue is that the build pipeline needs to be tweaked accordingly. Afaik the old c++ standard is enforced for compatibility-reasons with older compilers (amiga e.g.). Not 100% sure, but I will investigate (worstcase we can add a cmake flag which switches this automatically when compiling rtmidi on windows/mac/linux).

coderofsalvation commented 1 year ago

I have refactored your PR (thanks) to https://github.com/milkytracker/MilkyTracker/pull/312 so that for now RTMIDI triggers the switch to C11.