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
2
votes
0 answers

SFML Window don't close (she not respond) when launching an Ncurses term MacOS

I currently have a problem with SFML closing. All my project is running on MacBook Pro (15-inch, 2018) Catalina 10.15.3. My project is to build an Arcade system in C++. We process with a Core system which can interact with a dynamic graphic library…
Wazted
  • 101
  • 1
  • 9
2
votes
1 answer

Use mangled Rust functions from Rust dynamic library

Edit Note Since Rust (ver.: 1.42) still doesn't have a stable ABI, it is recommended to use extern (which is currently equivalent to extern "C" (may change in the future)) Otherwise, it may be necessary to recompile the libraries. This article…
K. Mihaylov
  • 103
  • 2
  • 10
2
votes
2 answers

How to share a global variable between a main process and a dynamic library via a static library (macOS)?

My question seems to be similar to this question however in my case the shared variable is in a static library and also the advice from this question didn't help me: Sharing global data between a shared library and main. Along the way I saw the…
Stanislav Pankevich
  • 11,044
  • 8
  • 69
  • 129
2
votes
3 answers

List shared library in the program executed using C/C++ on Linux

I want to know which dynamic libraries are loaded when executing a C/C++ program on Linux. For example, int main() { ... list = GetAllSharedLibraryFilePaths(); } list should contain: libm.so.6, librt.so.1, ... or paths:…
freddy
  • 463
  • 1
  • 8
  • 20
2
votes
1 answer

Dynamic library uses statics libraries, undefined symbols appears

I've look for a solutions to my trouble and just get some clues, but I could not find any consistent solution: I have the code of a dynamic library (libdyna.so), that uses the functions of 3 statics libraries (libone.a, libtwo.a, libthree.a) and the…
2
votes
1 answer

What's the VBAProject keyword?

In the Object Browser window there's a list of the libraries being used. By default it comes with: Excel (Microsoft Excel version Object Library) Office (Microsoft Office version Object Library) stdole (OLE Automation) VBA (Visual Basic For…
user7393973
  • 2,270
  • 1
  • 20
  • 58
2
votes
1 answer

What happens in linux when a dynamic library is updated on disk

What happens in linux when a dynamic library is loaded, updated on disk, then a new process is started that links to that library? Is the new process linked against the old in memory copy or the newer version on disk?
Mike Lowe
  • 21
  • 1
2
votes
0 answers

Reducing plugin (.so) size in Go using -buildmode=shared and -linkshared flags

I would like to reduce the size of the plugin (.so file) by removing common symbols used in both the plugin and the main program, e.g. go runtime and standard library. Here is my test project. main.go: package main import ( "fmt" "os" …
Aleksander Alekseev
  • 1,854
  • 4
  • 25
  • 57
2
votes
0 answers

XCode/gdb loses stack when debugging over calls to dynamic library functions on iOS

I've got an iOS project that links to an external static library written in C++. The static library makes calls to functions implemented by libstdc++, which is dynamically linked. For instance, I call the initialization function for this library…
shaheen
  • 411
  • 4
  • 12
2
votes
2 answers

C++ header-only with global state in a shared library

I'm working on a C++ library that I would ideally keep header-only. A specific part of this library requires a global state. Let's say it needs a global vector of strings for this example. I can easily achieve this with a static variable inside a…
Macmade
  • 52,708
  • 13
  • 106
  • 123
2
votes
1 answer

dynamic library issue: dlsym() failing to find smbol

I've been following Apple's Dynamic Library Programming Topics docs to create and use a runtime-loaded library using dlopen() / dlsym(). It seems I'm getting a failure to find the desired symbol on my Mid 2012 MacBook Air, running macOS…
Ian Taylor
  • 325
  • 5
  • 14
2
votes
1 answer

Destroying threads in Openmp (C++)

Is it possible to destroy the threads created by OpenMP? When the program starts, there is only the one thread. After the parallelized section multiple threads remain since there is a thread pool. Is there any way to destroy this pool after the…
Benjamin Pritchard
  • 915
  • 2
  • 8
  • 15
2
votes
1 answer

Clang not exporting C++ symbols

I'm using CMake to build a shared library. This library contains a few C++ classes that are supposed to be referenced by programs making use of this library. However, running nm on the resulting library shows that the C++ classes' functions are not…
denidare
  • 474
  • 1
  • 4
  • 16
2
votes
1 answer

Bundle c++ application using libc.so.6

I'm Trying to make my executable portable on linux, to do this i need to copy all the shared library used by the program itself, to check which one do I need I use: ldd program_name The output of the program helps me find all the required .so,…
Luca
  • 1,270
  • 1
  • 18
  • 34
2
votes
2 answers

C++: What to recompile when an inline function in a dynamic library changes?

I have two dynamic libraries and one executable: libOtherLibrary.so This is an existing open-source library written by someone else. libMyLibrary.so This is my own library that depends on libOtherLibrary.so. exe This is my own executable…