Top "Static-linking" questions

A static library or statically-linked library is a set of routines, external functions and variables which are resolved in a caller at compile-time and copied into a target application by a compiler, linker, or binder, producing an object file and a stand-alone executable.

How do I tell cmake I want my project to link libraries statically?

I'm trying to build an OpenCV-based project using CMake, running on Linux. So far my CMakeLists.txt files looks something …

linux opencv cmake static-libraries static-linking
Create statically-linked binary that uses getaddrinfo?

I have included the header netdb.h, where getaddrinfo is included, but gcc issues this warning: warning: Using 'getaddrinfo' in …

c gcc posix c99 static-linking
C++ Visual Studio: linking using pragma comment

I came across a piece of code which uses #pragma comment(lib, "libraryname"). Why this type of usage as opposed …

c++ visual-studio-2010 static-linking dynamic-linking
Deploying Yesod to Heroku, can't build statically

I'm very new to Yesod and I'm having trouble building Yesod statically so I can deploy to Heroku. I have …

linux haskell heroku static-linking yesod
Proper way to link a static library using GCC

Why is it that some static libraries (lib*.a) can be linked in the same way that shared libraries (lib*.…

gcc linker static-libraries static-linking glfw
How to add static libraries inside a C++ project with Xcode

I'm developing a C++ project by using Xcode 4.6.1 as IDE. Now, I'd like to add a static library mylib.a …

c++ xcode static-libraries static-linking
How to static link Linux software that uses ./configure?

I would like to compile NRPE static, so I can copy the compiled binary to an OmniOS server, where I …

linux gcc configure static-linking omnios
Compiling with -static-libgcc -static-libstdc++ still results in dynamic dependency on libc.so

I'm trying to make an executable that's as portable as possible. After removing a few dependencies, I came across the …

c++ c gcc glibc static-linking
How to add static libraries to a Visual studio project

I am trying to add static libraries to my project. To add the static library I am following Microsoft's instructions: …

c++ visual-studio-2012 static-linking
How to use static linking with OpenSSL in C/C++

I wrote simple apps with Openssl in C and C++. I compile them like this: gcc openssltest.c -o openssltest …

c++ c static linker static-linking