Questions tagged [dynamic-library]

Compiled binaries capable to be loaded in the process address space in runtime.

Dynamic Libraries are compiled binaries capable of being loaded/unloaded into/from the process address space at runtime.

In the Unix world, they are called shared libraies; in the Windows world, they are known as DLLs (dynamically-loadable libraries).

They can be loaded simultaneously into multiple processes, saving RAM and disk space.

Their file format is similar to, or even the same as, that of binary executables.

484 questions
6
votes
2 answers

Hiding symbols in a dynamic library without modifying source code

I have a closed-source 3rd-party shared library I need to link against. Unfortunately, the creators of the 3rd-party library didn't bother to limit which symbols are exported and exported all symbols. The 3rd-party library internally uses an…
heathbar
  • 799
  • 5
  • 12
5
votes
2 answers

Is the "C++ dlopen mini HOWTO" the recommended technique for compiling dynamically loaded C++ plugin libraries?

By Plugin. We mean a library that is loaded vi dlopen() and its symbols resolved via dlsym() (not a standard shard library that is dynamically loaded by the runtime system). Referring to http://www.isotton.com/howtos/C++-dlopen-mini-HOWTO/. The…
Roger Halliburton
  • 1,965
  • 3
  • 14
  • 18
5
votes
2 answers

Making Dynamic Library from Static ones using gcc --shared -m64 -Wl,--whole-archive ./*.a

I am getting this set of gcc errors, and I can't seem to get an answer from google or the man pages. Any insight on what these mean or where to start looking? Here is the line in the makefile: #After building several otehr bits of code into static…
Matthew Hoggan
  • 7,402
  • 16
  • 75
  • 140
5
votes
1 answer

How to manually add a library to a visual studio 2017 project?

My apologies for this very basic question that has assuredly been asked and answered before, also for my very dated terminology. I searched for an answer, but failed to find anything helpful. I am using the latest update of VS 2017 Community, and…
joglidden
  • 63
  • 1
  • 1
  • 6
5
votes
4 answers

Creating a generic binary in linux for all x86 machines

Im trying to compile a binary of an open-source project so that our users do not have to compile it themselves. I've noticed that some binaries created on one 32-bit ubuntu machine "A" don't work on 32-bit machine "B", with errors regarding missing…
Martin Konecny
  • 57,827
  • 19
  • 139
  • 159
5
votes
2 answers

AddressSanitizer and loading of dynamic libraries at runtime -> ()

I am using AddressSanitizer for all my projects in order to detect memory leaks, heap corruptions etc. However, when loading a dynamic library at runtime via dlopen, the output of AddressSanitizer leaves a lot to be desired. I wrote a simple test…
kamshi
  • 605
  • 6
  • 19
5
votes
0 answers

Link dynamic library with symbolic path instead of actual path in Xcode

I'm linking some OpenCV dynamic libraries in my Cocoa app. When I add a symbolic link (libopencv_core.dylib), what is actually get added is the resolved real file name (libopencv_core.2.4.13.dylib). This is problematic, since in our office, people…
mr49
  • 1,053
  • 1
  • 8
  • 26
5
votes
1 answer

OS X: Any way to DELAY loading of a DEPENDENT library (.dylib)?

A C++ dependent library .dylib resides in a bundle located in the app package's Content/Frameworks. I'd like to DELAY the loading of that dependent library until I've completed some specific initialization. Is there any way OTHER THAN to create a…
SMGreenfield
  • 1,680
  • 19
  • 35
5
votes
1 answer

Adding third party library dependencies to Android Library

I'm working on Android Library project and want to add Picasso to my library. I've noticed that different libraries use different approaches to do this: Some libraries use static library dependency (like gif_encoder and gif_decoder libraries in…
Olga Konoreva
  • 1,338
  • 13
  • 20
5
votes
1 answer

Rust: Segfault when executing specific line of code from a dynamically loaded library

Im writing a simple plugin-based system in Rust to gain some skills and experience using the language. My system dynamically loads libraries and executes them at runtime to initialize each plugin. Im running into an interesting segfault issue when…
Ashley Sommer
  • 337
  • 3
  • 12
5
votes
1 answer

Finding a symbol in my own process

Here's the setup: There's an application A that loads liba.so (linked at compile time) liba.so exports a symbol expA I don't control either A or liba.so Application A can load a library I specify, libmine.so, into the same process via dlopen (think…
Delyan
  • 8,881
  • 4
  • 37
  • 42
4
votes
3 answers

What is better to use in a Cocoa application: dynamic libraries or static libraries?

I need to use a library in a Cocoa application and can use either a dynamic (.dynlib) or a static (.a) version of it. I came from Linux world and would happily use the dynlib. However, since the app bundle will contain all the dependencies…
brandizzi
  • 26,083
  • 8
  • 103
  • 158
4
votes
2 answers

How to trace dynamically loaded library calls with ltrace

I have a C program using dynamically loaded library to load plugins. I would like to trace the library calls in order to debug the plugin's loading. I looked at ltrace, but I can't seem to make it work: Here is an example program: #include…
Wenzel
  • 147
  • 1
  • 14
4
votes
1 answer

Access static class members from dynamic library in c++

First of all, this is my first question, I normally found the answer looking for it, so sorry if I make some mistakes. I am trying to access to a member of a static class from a dynamic library. The problem is, I do not know why, the memory of this…
4
votes
1 answer

[Difference]: Static, Dynamic Library and Static, Dynamic framework. + Library and Framework in iOS

I have read so many articles about these topics on so many sites including stack overflow that I am so confused now which information is correct one and which is not. Can anybody help me to understand the concept of all five things mentioned in the…