Compiler Option: -static

Prefer static libraries over dynamic ones when linking


When creating an executable or a shared library/DLL, the -static compiler option can be used to tell the compiler to prefer linking against static libraries rather than shared libraries/DLLs. That way, if the linker finds both static and shared versions of a library, it will use the static version, rather than defaulting to the shared version.

Installing the proper static libraries and then using -static can be used to avoid some or all dependencies on shared libraries.

Platform Differences:
See also:
Back to Compiler Options
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki phatcode