dominikschnitzer / musly

Musly - Music Similarity Library
http://www.musly.org
Mozilla Public License 2.0
137 stars 27 forks source link

Building errors and solutions on Windows #37

Open aperfidia opened 7 years ago

aperfidia commented 7 years ago

Environment:

Problems:

f0k commented 7 years ago

Thank you for your report! First of all, is there a specific reason you need to build this with VS? The README file includes a guide for compiling with mingw: https://github.com/dominikschnitzer/musly#installation

Otherwise, your list is a mix of things we can or should change universally (const buffer_size, && instead of and, not defining uint8_t, #include <algorithm>), and things that are specific to VS (_USE_MATH_DEFINES, NOMINMAX). The latter would require some CMake magic to automatically add those defines if compiling with VS. Or actually, NOMINMAX should probably just be defined before include <windows.h>. Would you be willing to send a PR with the required changes to make it work in VS (without breaking compilation on Linux -- I can check that)?

About the BUILD_STATIC option, does #32 help?