Eliminate dependencies from C++/CLI to C runtime libraries

Asked 1 years ago, Updated 1 years ago, 126 views

I am currently creating an application using C++/CLI.

Create DLLs in C++/CLI (Function publishing using Dllexport syntax for C-like)
The application that created the DLL with native C and Win32 is calling.

The caller can remove the C runtime and dependencies in the MT option, but in the case of C++/CLI, the MT option is not applicable, so they want to remove the dependencies with the C runtime somehow.

Please let me know if there is any good way.

c++ c++-cli

2022-09-30 20:29

2 Answers

As a result of the investigation, I found that it was impossible in principle.
As a countermeasure, we solved the problem by distributing the C runtime DLL at the same time as the app.

From your own answers


2022-09-30 20:29

What you're looking for is Method: Delete dependencies with the CRT library DLLs and create a partial trust application?

Note: The msvc rNN.dll pointed out at runtime is different from the msvc mNN.dll mentioned in the article (NN is the corresponding VisualC++ version).As MSDN says /clr option and static link to CRT library cannot coexist, it seems impossible to break the dependence on msvcr100.dll.


2022-09-30 20:29

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.