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. This executable and the process of compiling it are both known as a static build of the program.
Questions tagged [static-linking]
1772 questions
0
votes
0 answers
Why Do I Get Undefined Reference When -L And -l Look Correct
I am using MinGW on a Windows 8.1 machine and I'm trying to reference a static library. Try as I might I get an undefined reference error.
This is usually just a case of passing the -L and -l flags normally right but here is what I do...
I have the…

kmp
- 10,535
- 11
- 75
- 125
0
votes
1 answer
Suggestion for "plugin" static library
I am writing a poem's library for fun, and I have difficulties in devising my task. I have one static library, and I'd like to make a "static plugin" system (forgive the name).
So, I'd like to create a series of static libraries that respect the…

senseiwa
- 2,369
- 3
- 24
- 47
0
votes
0 answers
How to link C program with assimp MinGW-w64
I've got a basic assimp example copied from the assimp site (with some minor modifications to make it work with C). Now the problem is that when it tries to link, assimp complains that it can't find ::operator delete(void*) or std::allocator or a…
user3190123
0
votes
2 answers
Why specify particular library in Visual Studio if the path to lib is known?
TL/DR: Question start with steps that I've made and that I think are important to mention (let me know if it is not important and I will delete it). The question itself is in the bottom of page. I've posted 3 questions that has the same steps that…

Wakan Tanka
- 7,542
- 16
- 69
- 122
0
votes
1 answer
What should we consider to use either static linking and dynamic linking?
Possible Duplicates:
Static linking vs dynamic linking
C++ application - should I use static or dynamic linking for the libraries?
What point we should take care before selecting static and dynamic linking?

anil
- 961
- 1
- 11
- 23
0
votes
1 answer
How does VS2015 link static libraries to other libraries and executables?
I'm trying to create a project, that will create an executable MyExec.exe, which will depends on another library Niftilib, which itself depends on zlib.
What I did is that I used cmake and created a superbuild, using ExternalProject_Add to download…

whiteShadow
- 369
- 4
- 19
0
votes
0 answers
Build static linked app with Qt5 on Windows
I am new to developing on Windows and Qt and I am trying to build my app with static linking to avoid errors such as "missing msvcp140.dll" on systems who lack Visual C++ Redistibutable. I know there is other solutions for that problem but I still…

Roger
- 657
- 5
- 18
0
votes
0 answers
Compiling a static executable
I am trying to compile an statically-linked executable, but I cannot seem to avoid producing a dynamically-linked one instead. I tried this compilation command first:
gcc -o test test.c -lcrypto -ldl -lz -static-libgcc
I have also tried just…

akfe79
- 59
- 1
- 1
- 5
0
votes
1 answer
Linker Problems with OpenSSL in Visual Studio 2013
I am using one OpenSSL function in my simple program. But I am getting unresolved symbols for that one function. Below is my project properties setup - I've followed other posts that describe how to include OpenSSL in a project and performed those…

sazr
- 24,984
- 66
- 194
- 362
0
votes
0 answers
linux gcc linking, duplicate symbols?
I'm somewhat new to linux. Recently I've been doing a bunch of c linux development. I was just debugging a segmentation fault. Unfortunately I hadn't used the gcc debugger as I guess I was lucky and most of the bugs I ran into where pretty easy…
user4238474
0
votes
0 answers
How can I get rid of these dll dependencies?
I'm building a c++ application which uses OpenSSL and Curl static libraries with Visual Studio 2013. My problem is that I wanted to create a standalone executable which is compatible with older versions of windows so I've enabled /MT flag in my…

Paralyz3d
- 313
- 2
- 11
0
votes
1 answer
How to debug Clang static-linked libraries in VS2015
I'm investigating the Clang codebase with VS2015, and the .sln file is generated by CMake.
I've configured the solution to Debug/x64, and I can see the generated .pdb files accompanying with the libs, but I can't break on the lib code that linked to…

Jamboree
- 5,139
- 2
- 16
- 36
0
votes
0 answers
C++ OpenGL Eclipse MinGW Linkage Error
I am trying to run some OpenGL code in Eclipse with SDL but keep running into linkage errors. I have properly linked the SDL .a files (as I have tested them by themselves and they have worked) but when it comes to the libglew32.a and libopengl.a my…

AstroHawking1090
- 35
- 7
0
votes
2 answers
How to compile a program for distribution on Mac
I am developing a program on OSX 10.6.4 (Snow Leopard), and I want to be able to run the compiled product on other Intel Macs, some of whom may not have XCode isntalled.
To simplify things, I first wrote a Hello World program.
#include
int…

highBandWidth
- 16,751
- 20
- 84
- 131
0
votes
1 answer
GCC ICU 57 static linking
I am trying to link ICU 57 to my binary file. That does not work even thought (I think at least) I am linking the static lib files.
Here is a blunt example:
gcc -static /usr/lib/libicui18n.a /usr/lib/libicuuc.a /usr/lib/libicudata.a…

Mihai H
- 3,291
- 4
- 25
- 34