PortMidi / portmidi

portmidi is a cross-platform MIDI input/output library
Other
116 stars 31 forks source link

warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library #17

Closed nidefawl closed 2 years ago

nidefawl commented 2 years ago

Please consider removing that hack in pm_win/static.cmake. Currently the project links to the release runtime for debug builds. This causes a warning when linking my project in debug mode.

If you want to use the static lib, this is the way to do it with modern CMake: set_target_properties(portmidi PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

See https://cmake.org/cmake/help/latest/prop_tgt/MSVC_RUNTIME_LIBRARY.html

nidefawl commented 2 years ago

I created a pull request https://github.com/PortMidi/portmidi/pull/18