c# - How to build a visual studio 2010 solution into a standalone dll? -
i have visual studio 2010 project, uses static , dynamic libs (.lib
, .dll
), project compiled , built .exe
both in release , debug modes, code c , c++.
what right way compile , wrapping solution 1 standalone .dll
file.
i want have 1 dll file, i'll able load in other c, c++, c# project safely.
in case want load in teraterm , in other simple self developed c# application.
visual studio has c++ linker option called "link library dependencies": http://msdn.microsoft.com/en-us/library/024awkd1(v=vs.90).aspx
this link object files projects in solution directly project output (via dependency tracking). careful when use though, if use in exe , dlls you're linking export symbols exe export them.
update:
here's more detail: happens instead of linking dlls (this assumes have dlls you'd link set dependencies of project in solution) produce separate binaries, linker takes outputs each individual project dependency , links them final executable/dll directly, creating monolithic dll.
a side effect (depending on code) overall size of output reduced little, monolithic dll (or exe) might large in general, smaller in size individual output files combined due link-time optimisations. symbols exported objects linked exported final dll, since marked such in compilation step.
Comments
Post a Comment