1 year ago

#386944

test-img

chili

C Runtime-Agnostic, Standalone Library

Specifically in MSVC, is it possible to build a library that doesn't require the project that consumes it to use a specific version of the C++ runtime? If so, how would such a feat be accomplished?

I would like to build a library containing, for example, a simple function F that in turn calls functions from some version of the MSVC CRT, as well as calling functions from other 3rd-party libraries. The end product should be a library that I can link to any project I like, without causing conflicts in CRT versions, or complaining about redefined CRT symbols, or complaining about missing symbols from 3rd party dependencies that the library consumes.

In other words, I would like to complete encapsulate the details of the implementation of function F, exporting only F itself.

If such a thing is not at all possible, please provide an explanation as to why it is not feasible. I am open to additional restrictions such as extern "C" or requiring that the library be a dll rather than a static library.

c++

c

visual-c++

0 Answers

Your Answer

Accepted video resources