Questions tagged [static-linking]

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.

1772 questions
0
votes
1 answer

Is static linking slower than local code

I am writing some statistical software (C++) where speed is the top priority; second to that is maintainability. Separately, I have written a static library which bundles together a collection of algorithms that I use routinely. Many of my programs…
Blair Fonville
  • 908
  • 1
  • 11
  • 23
0
votes
1 answer

How do I test the final built product of an iOS static library, as opposed to it's constituent classes?

I have written a static library to re-use some code between iOS projects, let's call it MyLib. While MyLib has good unit test coverage, it interacts heavily with external resources, and I'd like to make sure that it does the right then when it's…
0
votes
2 answers

How to statically link FreeType2 in Visual Studio?

I built Freetype 2.9 from source in VS2017 into a static library by choosing Debug Multithreaded/SingleThreaded configuration. Seemingly, the static library is placed in freetype-2.9\objs\x64\Debug Static\freetype.lib. In VS2017, in Additional…
Joaqo
  • 51
  • 1
  • 7
0
votes
1 answer

Overriding MacOS High Sierra /usr/lib (or how to static link)

I have a program I'm compiling that requires a new version of Curl. Mac default Curl is in /usr/bin and /usr/lib. I have compiled a newer version of curl and compiled using: gcc mypgm.c -I ./curl-7.58.0/include/curl -I ./cJSON-master -L…
John Smith
  • 3,493
  • 3
  • 25
  • 52
0
votes
2 answers

Statically linking libs in Visual Studio

When you choose /MTd static linking in Visual Studio, would it try to link to each lib statically or there are some exceptions to system libs?
0
votes
1 answer

Does when using dynamic framework increase binary size than using static framework?

This is iOS & Cocoapods question. My iOS App launching speed was too slow. So, to reduce the dylib loading time, I changed the dynamic frameworks in Pods to static frameworks by using cocoapods-static-frameworks. And then, as I wanted, reduced the…
0
votes
0 answers

Compilation issue when trying to link object file with static library and generating binary output

gcc -c -o app main.o build/service.o -std=c++11 -lstdc++ -lboost_system -lboost_thread -lpthread simulation_tool.a gcc: warning: main.o: linker input file unused because linking not done gcc: warning: build/service.o: linker input file unused…
0
votes
0 answers

C Static linking and dynamic linking

Am working on a project that requires us to statically link a file and also dynamically link pthread_create and pthread_join in a C program. I have found resources on the static linking but i cant seem to find anything on dynamic linking that that…
Zulu
  • 3
  • 2
0
votes
0 answers

static library multiple version

Suppose I have an addin dll (Addin.dll) for application App.exe that links with Static Library Foo.lib. Foo.lib is created while building application App.exe. App.exe has multiple minor releases say App.exe (Version 1.0), App.exe (Version 1.1),etc.…
0
votes
0 answers

Could not find or load the Qt platform plugin 'windows'

Error: This application failed to start because it could not find or load the Qt platform plugin "windows" in "C:\Users\jsmith\AppData\Local\Temp_MEI23522\qt5_plugins\platforms". Reinstalling the application may fix this problem. My PyInstaller…
J. Doe
  • 111
  • 1
  • 1
  • 6
0
votes
0 answers

How to link against system libraries and not Matlab's provided libraries

We have Matlab R2017a installed on a RHEL 7.3 machine and I can provide verbose installation instructions if necessary. We have the Matlab library paths saved in /etc/ld.so.conf.d/matlab.conf and have run ldconfig to make sure the paths get picked…
themanatuf
  • 2,880
  • 2
  • 25
  • 39
0
votes
1 answer

How do I properly link .a library file and its header?

I am using this bcrypt library for some password hashing. I have used the provided makefile to generate a library file called bcrypt.a. I also have the header file in my code and I using a class (Cryto.h/Crypto.cpp) to create a wrapper around the…
Dikshant Adhikari
  • 664
  • 1
  • 10
  • 24
0
votes
1 answer

How to statically compile a Fortran code

I compiled a copy of codes on one PC by Intel Fortran with the Lapack library. And then I ran it on another PC (the same OS without having Lapack installed). It failed. This can be solved by installing Lapack on the other PC. The same problem…
hengyue li
  • 448
  • 3
  • 17
0
votes
1 answer

Xcode Cocoa app libav* and MagickWand static library issues

I've been developing a Cocoa app that uses both the libav* and ImageMagick C libraries but am having issues actually distributing the app. I have linked to the various static libraries in Xcode like so: The app builds and runs perfectly fine on my…
james00794
  • 1,137
  • 7
  • 14
0
votes
1 answer

Standalone wxWidgets app asking for linked library

wxWidgets newbie here. Trying to compile an example code as a standalone program, and I'm sure that I had all the required static libs included Here's the compilation log. I'm using CodeBlocks with mingw32 -------------- Build: Debug in wxRaw…
ckchai
  • 36
  • 4