-
Notifications
You must be signed in to change notification settings - Fork 661
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
Remove redist dependency with /MT #660
Comments
Hi @1364529444 , With MD executable are smaller, people can update by just replacing the library, no issue with shared memory. |
if compiled in /MT,the exe and dll can run without any vc runtime requirements. and you said "shared memory",in fact,it's a bad code style that malloc/new memory in on module and free/delete in another module. |
Thank you @mccoysc for the input. I will make some test and see about it 👍 |
If I may add my 2 cents, it's best to distribute both flavors (MD and MT). If you look at boost's nuget binaries for windows, they release both. In our case, we link our dokan FS code with other libraries also compiled with /MD, so having a /MD-compiled dokan static library is important for us. |
Yes,you can use dokan which compiled with /MT and other 3rd-party libs which compiled with/MD,they will work well.
… On Mar 10, 2018, at 08:25, atanamir ***@***.***> wrote:
If I may add my 2 cents, it's best to distribute both flavors (MD and MT). If you look at boost's nuget binaries for windows, they release both. In our case, we link our dokan FS code with other libraries also compiled with /MD, so having a /MD-compiled dokan static library is important for us.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
yes, but it's not recommended. It's best if they all use the same; the goal of /MD is to reduce binary size, and that only works when everything is linked in using /MD. Again, both /MD and /MT should be distributed together, and the devs can pick which one to use. The compielr warns you when you mix them: LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library |
In fact ,/MD increase the app pkg size and app dependcy issues.
/MT compiled exe only link the code which used by your exe,not the entire run-time file.
… On Mar 10, 2018, at 09:27, atanamir ***@***.***> wrote:
yes, but it's not recommended. It's best if they all use the same; the goal of /MD is to reduce binary size, and that only works when everything is linked in using /MD. Again, both /MD and /MT should be distributed together, and the devs can pick which one to use.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
There's definitely pros and cons to either approach. Dynamic linking of the C++ library allows your application to receive any patches they release to the runtime libraries in the future, whereas /MT will not. I prefer MD to MT, every person is entitled to their preference. Again, as I've mentioned, both should be distributed, not one or the other. |
/MD can receive run-time patches……but in fact no any end-point users care about the patches and nearly,ms give none c/c++ run-time patches.
… On Mar 10, 2018, at 09:35, atanamir ***@***.***> wrote:
There's definitely pros and cons to either approach. Dynamic linking of the C++ library allows your application to receive any patches they release to the runtime libraries in the future, whereas /MT will not. I prefer MD to MT, every person is entitled to their preference. Again, as I've mentioned, both should be distributed, not one or the other.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
The new release include has a installer without the VC redist dependency |
compile the exe and dlls with /MT param,not /MD pls.
and then any extra run-time dlls(vcpxxxx.dll,etc) needed.
The text was updated successfully, but these errors were encountered: