static-linking Questions

4

Solved

I'm trying to compile and statically link Emacs, because at work I'm forced to do JavaScript development over ssh on a production server running CentOS 5.1 with a broken package manager configurati...
Pangenesis asked 5/7, 2013 at 0:16

3

I'm using Code::Blocks IDE(v13.12) with GNU GCC Compiler. I want to the linker to link static versions of required runtime libraries for my programs, how may I do this? I already know that my exec...
Deland asked 29/9, 2014 at 15:53

1

When building my project with CMake, I would like it to link to libraries statically (if available). Right now, it finds .dll.a files, regardless of the existence of .a files. For example, take lin...
Convexity asked 16/8, 2020 at 9:44

20

Solved

When creating a class library in C++, you can choose between dynamic (.dll, .so) and static (.lib, .a) libraries. What is the difference between them and when is it appropriate to use which?

1

In CMake, we can write: add_library(mylib mylib.c) for a dynamically-linked (shared) library, and add_library(mylib STATIC mylib.c) for a static one. But - can we start with the first syntax, the...

3

From its official code site, I am able to download & install the WebRTC in Ubuntu. Now I intend to use its certain C++ APIs in our server for the purpose of creating P2P endpoints and encryptin...
Warmup asked 14/2, 2022 at 4:7

4

Solved

I have included the header netdb.h, where getaddrinfo is included, but gcc issues this warning: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared librar...
Trillion asked 27/4, 2010 at 21:25

6

I'm working on a C++ application for Windows that uses OpenSSL 1.0.1e library. I'm on Visual Studio 2008. For portability reasons my application is statically linked against runtime libraries (/MT...
Sprayberry asked 28/8, 2013 at 11:10

5

Solved

I'd like to link libpng found by pkg-config statically. pkg-config --libs --static libpng outputs -L/usr/local/Cellar/libpng/1.6.15/lib -lpng16 -lz I have both libpng16.a libpng16.dylib in ...
Prussian asked 21/12, 2014 at 3:34

2

I would like to write a program using Scala Native but it has to run on a linux host (centos 6.5) with a very old glibc. So I would like to deploy that program as a statically linked executable, e....
Sumptuous asked 5/11, 2017 at 8:33

3

Solved

I'm using CMake in a project, and I'm trying to statically link some libraries. I've set: set(BUILD_SHARED_LIBS OFF) set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static") set_targ...
Gambit asked 7/6, 2013 at 19:4

3

Solved

Most of the sources online state that you can statically link glibc, but discourage from doing so; e.g. centos package repo: The glibc-static package contains the C library static libraries for -s...
Brussels asked 13/8, 2019 at 11:10

10

Solved

I use mingw from here: http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.7.2/32-bit/threads-posix/sjlj/x32-4.7.2-release-posix-sjlj-rev2.7z/download And I've sucessfully ma...
Begin asked 7/12, 2012 at 18:0

3

Solved

I have a project which compiles c++ generated protobuf serializers into a static library. An executable links against this library, and an .so (.dll) does too. The executable later loads the .so fi...
Nagpur asked 8/10, 2015 at 14:0

21

I have a problem with linking my mixed language framework to a project. I create a framework with Swift and Objective-C classes. The main logic was stored in the Swift file. For example the class...
Christoperchristoph asked 27/9, 2018 at 11:51

4

Solved

I'm very new to Yesod and I'm having trouble building Yesod statically so I can deploy to Heroku. I have changed the default .cabal file to reflect static compilation if flag(production) cpp-opt...
Dehydrate asked 28/12, 2011 at 15:40

2

Solved

I am getting started with Unreal Engine 4. I come from Libgdx and I am familiarized using WebSockets clients in my games and NodeJS with 'ws' on the server. How ever, I can't find information abou...

2

I've created a self-contained .NET Core console application following this good tutorial. This process produces a /publish folder with 123(!) files, including my executable. Now, since all these d...
Tergiversate asked 14/3, 2017 at 10:59

2

Solved

The GMP docs say that static linking may provide a small performance improvement. I am having a problem getting it to staticly link libgmp on my Linux systems. I've narrowed down the issue I'm hav...
Eriha asked 8/11, 2011 at 21:7

3

Since the dynamically linked libraries have to be resolved at run-time, are statically linked executables faster than dynamically linked executables?
Alansen asked 12/1, 2011 at 10:49

1

Solved

I use CMake to build a project that consists of multiple nested static libraries .A similar but simple structure is shown in the figure below: TestProject: |-CMakeLists.txt |-Main.cpp |-level2 | | ...
Cathern asked 20/8, 2021 at 15:21

2

I'm trying to build a Qt5 application with static libraries using CMake, but I can't figure out how to link the files statically. I've been stuck on this for hours and tried to find any clues on go...
Ridenhour asked 31/10, 2017 at 11:41

3

Solved

I have a project with dependencies on Hyper and Diesel, and because of that, on native libraries OpenSSL and libpq. The project builds on nightly Rust because it uses compiler plugins. My current ...
Despiteful asked 19/11, 2016 at 16:6

2

I wrote simple code in C, Go and Rust. foo.c #include <stdio.h> int main() { printf("hello\n"); return 0; } foo.go package main import "fmt" func main() { fmt.Println("hello"); } ...
Phycomycete asked 23/10, 2019 at 15:54

6

My PyInstaller spec: # -*- mode: python -*- block_cipher = None a = Analysis(['test.py'], pathex=['C:\\Users\\admin\\compile'], binaries=[('C:\\Python361\\Lib\\site-packages\\PyQt5\\Qt\\plugi...
Edmead asked 24/11, 2017 at 7:56

© 2022 - 2024 — McMap. All rights reserved.