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

CMake defaults to MD runtime #211

Open
raub opened this issue Nov 18, 2023 · 5 comments
Open

CMake defaults to MD runtime #211

raub opened this issue Nov 18, 2023 · 5 comments

Comments

@raub
Copy link
Contributor

raub commented Nov 18, 2023

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" ..
@meshula
Copy link
Member

meshula commented Nov 18, 2023

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

@raub
Copy link
Contributor Author

raub commented Nov 19, 2023

Are you going to add a new release/tag anytime soon, or is it better to just take the main branch?

@meshula
Copy link
Member

meshula commented Nov 19, 2023

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.

@raub
Copy link
Contributor Author

raub commented Nov 19, 2023

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)

@meshula
Copy link
Member

meshula commented Nov 20, 2023

Ah, thanks for the note about the qmake folder. I don't use qmake, and was wondering if anyone was using it.

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

No branches or pull requests

2 participants