CMake defaults to MD runtime
raub opened this issue · comments
The default CMake flags set /MD
which is for DLL. Static libs should be compiled with /MT
to avoid errors like:
LabSound.lib(AudioParam.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in bindings.obj
On Windows I was able to override the RTL selection by using the following command to build LabSound:
cmake -A x64 -D CMAKE_POLICY_DEFAULT_CMP0091=NEW -D CMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded" ..
Good find, thanks. I bumped the cmake minimum to 3.15, and set the policy in the root cmakelists.txt file. I added a line of documentation with it to tell how to set the MultiThreaded library from the variable, as you've shown in your example. a80d6d7
Are you going to add a new release/tag anytime soon, or is it better to just take the main
branch?
You might have noticed the activity on the waveshapernode. i think the threading problems will be resolved soon, and the fixes are important enough to make s new release.
Things are stable enough now that I think it is safe to use main, a point release should come soon though. Maybe within several days.
Yeah, I saw that. I'm now debugging another issue that has bothered me for a long time. I will report when I have progress.
By the way, consider removing https://github.com/LabSound/LabSound/tree/main/qmake folder - it is outdated, and also I found a better way to build everything with CMake (as in https://github.com/node-3d/deps-labsound-raub/blob/master/.github/workflows/build.yml)
Ah, thanks for the note about the qmake folder. I don't use qmake, and was wondering if anyone was using it.