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
How does GCC/Clang compilers decide the symbol type?
I have an issue with binary (already stripped) displaying symbols that leak a confidential information. When I look at binary, all symbols that are of concern are one of T, D or S types.
Now since binary is statically linked (using external static…

Alexey Kamenskiy
- 2,888
- 5
- 36
- 56
0
votes
1 answer
add boost as static lib to project in cmake
I need to link boost library as link library to my project...
Build system is cmake v
I do something so:
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME ON)…

xperious
- 239
- 3
- 10
0
votes
1 answer
How to resolve "undefined reference" error while statically linking cppunit?
I am not sure why this question is marked as a duplicate of Why does the order in which libraries are linked sometimes cause errors in GCC?. That question and this question are two totally different questions.
I have installed libcppunit-dev with…

Lone Learner
- 18,088
- 20
- 102
- 200
0
votes
0 answers
Building and packaging a portable ffmpeg Linux program ('GLIBC_2.27' not found)
I am trying to build a portable version of ffmpeg to run on major Linux distributions, with the final user only having to extract the distributed targz package to the appropriate directory.
My previous builds on Ubuntu 16.04 worked fine. I upgraded…

Blue4Whale
- 11
- 3
0
votes
1 answer
How to correctly link wxWidget static libraries in Code::blocks?
I am getting multiple(160+) undefined reference to `XXXXXXXXXX' when compiling a wxwidget project,
https://wiki.wxwidgets.org/Compiling_wxWidgets_with_MinGW#undefined_reference
says
your static libs MUST be given before shared…

topcat
- 177
- 3
- 17
0
votes
3 answers
Problem with linking one file containing namespace definition with another using that namespace in C++?
I have two files once is named as test.cpp and another as ani.cpp.
test.cpp is as follows:
#include
namespace Anirudh{
void start(){
std::cout<<"This is the start function of the namespace Anirudh\n";
}
}
and the file…

Durin
- 2,070
- 5
- 23
- 37
0
votes
0 answers
Why do I get 'undefined reference' when linking to my own static library?
I am building a small static library that currently contains just a single object file. When I try to link it to a program I get a range of 'undefined reference' errors. All of the errors appear to be related to definitions in the .cpp file.
The…

M. Webb
- 157
- 11
0
votes
3 answers
Using Curl in Delphi without the DLL
I have a Delphi program in which I need to use Curl, but I do not want to redistribute the curl DLL with it (and I don't want to add the DLL as a resource and write it to a file at runtime and do it that way). With the Curlpas library, you have to…

Kokonotsu
- 189
- 2
- 9
0
votes
0 answers
How to link statically to wxWidgets from Kdevelop on linux?
Hello I have installed wxWidget-3.1.0 s on windows it works fine using it from MSVC++. But On Linux fedora 27 I built it in a sub-directory "wxWidget3.1.0/build-gtk-unicode-release".
These are the comands:
../configure --disable-debug
make
sudo make…

Maestro
- 2,512
- 9
- 24
0
votes
1 answer
How can I compile c++ opengl code using Atom?
So I've installed gpp-compiler extension for Atom, I've put glut.h into my MinGW\include\GL directory as well as I've put libglu32.a file into my MinGW\lib directory and also I didn't forget to put glut32.dll,glu32.dll into C:\Windows\System32 and…

Koniotaur
- 11
- 1
- 6
0
votes
2 answers
How simplest to reference a static library from Visual Studio 2017?
Our product requires a static library (.lib) file to be linked as part of a Vendor's API.
I have a project defined for the API which supplies a number of functions & classes, and that generates a .lib file.
But for that .lib to link and be used by a…

Mordachai
- 9,412
- 6
- 60
- 112
0
votes
1 answer
Best practice for shipping iOS library that links against Apple (Accelerate) framework
I've written in C++ static .a library that links accelerate framework.
I've written an ObjC consumer project to demonstrate this library. The consumer also needs to link Accelerate framework! (I wasn't expecting this).
Is there some way of packaging…

P i
- 29,020
- 36
- 159
- 267
0
votes
1 answer
Integrating (C++) library and consumer app in XCode 9
I have created a C++ (static) library libFoo.a.
I wish to create an iOS ObjC app in XCode that uses this library.
I would like to have both projects side-by-side. So that I can modify the library code, rerun the consumer app, and it will…

P i
- 29,020
- 36
- 159
- 267
0
votes
1 answer
Static or dynamic linking of .SWF files
If you compile a Flash project into a .swf file and that project refers to another .swf file, is it linked statically or dynamically? That is, is the second .swf file contained physically in the first .swf file or does the first .swf file refer to…

Paul Reiners
- 8,576
- 33
- 117
- 202
0
votes
1 answer
CMake cannot link statically on Linux (perfectly works on Windows)
I do have the following CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(testovnik)
include_directories(include)
file(GLOB SOURCES "src/*.cpp" "include/*.hpp")
file(GLOB TESTS "tests/*.cpp")
set(EXECUTABLE_NAME…

minecraftplayer1234
- 2,127
- 4
- 27
- 57