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

Windows loader uses dynamic MSVCRT by default #436

Open
gboccone-qcom opened this issue Dec 1, 2023 · 3 comments
Open

Windows loader uses dynamic MSVCRT by default #436

gboccone-qcom opened this issue Dec 1, 2023 · 3 comments
Labels
enhancement New feature or request synced to gitlab Synchronized to OpenXR internal GitLab

Comments

@gboccone-qcom
Copy link

gboccone-qcom commented Dec 1, 2023

The comments on line 220-221 say one thing but this line is doing something else:

Edit: I've read the comment again, it seems to be fine, probably a misunderstanding on my side. However the default build behavior has changed, and we are using a dynamic MSVCRT for the static build. I don't know if this is the right thing to do. Changing the following line from AND NOT to OR NOT fixed my issue but it's probably the wrong approach.

if(DYNAMIC_LOADER AND NOT (CMAKE_SYSTEM_NAME STREQUAL "WindowsStore"))

@gboccone-qcom gboccone-qcom changed the title Windows loader is configured as UWP by default Windows loader uses dynamic MSVCRT by default Dec 1, 2023
@rpavlik
Copy link
Contributor

rpavlik commented Dec 1, 2023

Yes, that's why this release hasn't been announced yet, having the .def inside that condition is breaking UWP builds, I have a hotfix pending for it. It shouldn't change the default behavior, though...

For whatever reason, I understood the old and current behavior to be:

  • UWP: Always dynamic msvcrt
  • regular windows, loader DLL: Static crt
  • regular windows, loader .lib (static library): dynamic crt

I do not know why exactly this is the way but I think that the Microsoft people were the ones who recommended it.

@gboccone-qcom
Copy link
Author

I see. In my case, I was using the default static lib build, but I could link my application with static loader and static crt.

Now I get an error when I try to link because the loader requires the dynamic crt and the application is configured to use static.

It's not just default, it's the only option available.

@rpavlik-bot
Copy link
Collaborator

An issue (number 2159) has been filed to correspond to this issue in the internal Khronos GitLab (Khronos members only: KHR:openxr/openxr#2159 ), to facilitate working group processes.

This GitHub issue will continue to be the main site of discussion.

@rpavlik-bot rpavlik-bot added the synced to gitlab Synchronized to OpenXR internal GitLab label Dec 11, 2023
@rpavlik rpavlik added the enhancement New feature or request label Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request synced to gitlab Synchronized to OpenXR internal GitLab
Projects
None yet
Development

No branches or pull requests

3 participants