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.

Linking static library with JNI

Java versions prior Java 8 requires native code to be in a shared library, but I've read that with Java 8 it's …

java java-native-interface static-libraries java-8 static-linking
Why does gcc not implicitly supply the -fPIC flag when compiling static libraries on x86_64

I've had numerous problems compiling shared objects that link statically against static libraries. This problem only shows up on x84_64 …

gcc compilation dynamic-linking static-linking gnu-toolchain
Difference between linking OpenMP with -fopenmp and -lgomp

I've been struggling a weird problem the last few days. We create some libraries using GCC 4.8 which link some of …

c++ openmp static-linking dlopen
CMake: how to produce binaries "as static as possible"

I would like to have control over the type of the libraries that get found/linked with my binaries in …

linker shared-libraries cmake static-linking dynamic-library
How can i link my c++ program statically with libstdc++ on osx using clang?

i'm writting c++ program and i want to distribute it on Mac OS X versions 10.6 and above. The problem is …

c++ macos clang static-linking libstdc++
VS2010: Link in a single library statically

Situation: I'm building a library with VS2010, and it has a dependency on LibraryA. I am only using one of …

visual-studio-2010 static-linking
Is a statically linked executable faster than a dynamically linked executable?

Since the dynamically linked libraries have to be resolved at run-time, are statically linked executables faster than dynamically linked executables?

performance dll linker static-linking dynamic-linking
Small Haskell program compiled with GHC into huge binary

Even trivially small Haskell programs turn into gigantic executables. I've written a small program, that was compiled (with GHC) to …

haskell linker ghc static-linking glfw
Combining static libraries

Suppose I have three C static libraries say libColor.a which depends on *libRGB.*a which in turn depends on …

c linux static-libraries static-linking unix-ar
Why create a .a file from .o for static linking?

Consider this code: one.c: #include <stdio.h> int one() { printf("one!\n"); return 1; } two.c: #include <…

c linux gcc static-linking