How to reuse static library code which is already linked into a DLL with another C++ application in visual studio 2010? -
i'm working on c++ solution in visual studio 2010. i've dll file using standard c++ library functions (such string or file functions). portability reasons have compile dll /mt option, required runtime library functions linked released dll file.
i've c++ project windows application, project compiles /mt option , generates standalone exe file. second project uses same standard c++ library functions linked in dll (the executable uses dll exported methods).
now here question: there way tell linker don't link common runtime functions linked dll file & don't link these shared parts again in exe file (e.g. reuse same code string functions linked dll)?
no, can't that. although executable depends on dll, can still considered separate , stand-alone binary artifacts, each of should contain required symbols proper execution.
this 1 of reasons why dynamic linking preferred. furthermore, don't see problem link dynamically , redistribute runtime application.
although microsoft visual c runtime included on platforms, there many different versions of it, of buggy or/and break backward compatibility. thus, idea distribute version of msvcr*.dll know works sure application.
Comments
Post a Comment