Closed Papirosnik closed 6 years ago
I have no idea what DLL/static in Properties -> Reference Packages selection does...
It looks like I just need to add one more configuration to nuget packaging.
I'm not very experienced with windoes RT lib... Do you know what are the advantages of haveing RT dynamically linked? Maybe we could have only statically linked RT option?
One of the advantages of dynamic linking I can guess is smaller size of executable. And it doesn't matter at all in our case. Moreover, disadvantages are more significant (DLL hell for example). Having two versions of the linking would be ideal case but for simplicity let's keep one of them. And as I mentioned above my personal choice is static linking.
Properties -> Reference Packages lets us select desired configuration if more than one exist in the package. See pugixml nuget package for example, it contains both static and dynamic linking libs. And this options allows us to select desired one.
I will switch all my projects to statically linked RT lib. I don't see a reason for dynamic linking on Windows...
I found this article http://www.davidlenihan.com/2008/01/choosing_the_correct_cc_runtim.html and it actually has a good point about how to select which runtime to use. Looks like it is better to use dynamic runtime to avoid mixing runtime libs. Most of the libraries used dynamic runtime, including opengl32.dll, so switching to static runtime is not a good idea, That means that this issue is to be dropped.
@Papirosnik do you have any other reasoning why we need static runtime linkage?
Closing this as there is not enough need in supporting static runtime for now.
Hi there! I try to compile svgren.lib (or dll) for Win32 with statically linked runtime (/MT flag instead of /MD ). VSVS 2015 give me a bunch of linking error (see bellow) Steps to reproduce:
There are lot of complains about unresolved externals symbols and mismatch detected:
build.log.txt
Properties -> Reference Packages shows that we have choice between static and dynamic for cairo and pixman libs.
Further investigation shows that in despite of these settings all libs are 'multi-threaded dll' linked (they all contain -MD flag inside, instead of -MT).
Earlier I saw in some previous versions of svgren, pugixml package had two selectable options (static / dynamic)
It would be nice if we could choose what runtime to use too. (I personally prefer static linking)
Many thanks for your work!