Skip to content

Add an option in CMake to build cpprestsdk using /MT #881

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

Open
howryu opened this issue Oct 1, 2018 · 2 comments
Open

Add an option in CMake to build cpprestsdk using /MT #881

howryu opened this issue Oct 1, 2018 · 2 comments

Comments

@howryu
Copy link

howryu commented Oct 1, 2018

I am building cpprestsdk by myself on widows using cmake. Right now it worked as excepted that by default cmake is built with /MD option. It would be better to have an option to build with /MT. I know I can use vcpkg, but I am more comfortable with building the package by myself.

@ioannis-e
Copy link
Contributor

Modifications to the library are needed to build with /MT successfully and prevent it from crashing as return values like std::string from exported functions in dynamic libraries will tend to corrupt the heap and crash the application at the point of class destruction when the library is built as a dynamic library with /MT.

I am currently working on a solution about both of the issues above, but changes are substantial and require extensive testing.

@ioannis-e
Copy link
Contributor

@howryu you may want to check out #884 to assist with testing out the modifications to the library. You will have to make CMake modifications on your own.

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