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
1
vote
0 answers

R package installation on MacOS: Image not found error

I tried to install rgdal package in R on my Mac machine, but the error message came out as below: Installing package into ‘/Users/isong/Library/R/4.0/library’ (as ‘lib’ is unspecified) * installing *source* package ‘rgdal’ ... ** using staged…
Felix Song
  • 21
  • 4
1
vote
0 answers

How to put breakpoints inside a linked library in CLion?

Is there a way to put a breakpoint inside a library linked in CLion? The library is compiled with debug symbols. I can step inside of its code if I put a breakpoint in my code, but I would like to put a breakpoint directly inside of it. The main…
debevv
  • 145
  • 2
  • 8
1
vote
0 answers

shared object symbol inclusion

I'm writting a program that relies on a shared object libLTK.so I also write the code of libLTK.so which relies on libunwind.so libunwind.so was fetched using regular package installation. I am able to compile libLTK.so and the resulting ELF…
Lewis Anesa
  • 102
  • 3
  • 12
1
vote
1 answer

On linking of shared libraries, are they really final, and if so, why?

I am trying to understand more about linking and shared library. Ultimately, I wonder if it's possible to add a method to a shared library. For instance, suppose one has a source file a.c, and a library lib.so (without the source file). Let's…
1
vote
1 answer

Ctypes. How to pass struct by reference?

I try to write Python wrapper for C library using ctypes. So far I have: C.h typedef struct { int erorrCode; char * Key; } A; #ifdef __cplusplus extern "C" { #endif EXPORT void __stdcall DestroyA(A…
1
vote
1 answer

Why is my main not finding the functions from my shared library?

I have 4 separate functions in 4 different files. The functions look like this: SieveOfEratosthenes.cpp bool SieveOfEratosthenes(int n) { // } They all have no includes. In my main.cpp program I have //Includes void compare(bool (*f)(int))…
UserX
  • 187
  • 1
  • 7
1
vote
1 answer

Compiling OpenSSL in Windows - generated LIB uses wrong name for DLL files

I'm trying to compile OpenSSL 1.1.1d version locally. Due to my project, I need to edit windows-makefile.tmp under Configuration folder. I have to prepend the file extensions like so: our $objext = $target{obj_extension} || "_vc10.obj"; our…
1
vote
1 answer

Getting around __declspec(dllimport) in windows to linux project conversion

Im in the process of converting a visual studio c++ framework over into a linux build, and in the process of eliminating windows dependencies I ran into a whole bunch of __declspec(dllimport) calls in some header files. These header files define a…
Bendrix
  • 98
  • 12
1
vote
1 answer

Cannot Load C dynamic library with C Program compile with liblua.a (lua5.3)

I first download lua-5.3.5 , and put the source in my working directory and compile it with make linux so I got the liblua.a and lua binary file in ./lua-5.3.5/src. And then I write a C Dynamic Library like this : #include #include…
Lynton
  • 257
  • 5
  • 12
1
vote
1 answer

Graphviz as library in windows

I am contacting you regarding Graphviz libraries. I have a bug that I observed when using graphviz as a library within c++ code and qt creator on windows. Based on the example from the Documentation, I used the following function to convert a dot…
froz
  • 163
  • 1
  • 12
1
vote
0 answers

Calling dlopen() twice on a dynamic library with undefined symbol

I'm opening a dynamic library with a call to dlopen(): void *handle = dlopen("mylib.so", RTLD_LAZY | RTLD_GLOBAL); if (!handle) printf("%s", dlerror()); When this is called for a library which has an undefined symbol, the returned handle is…
user3132457
  • 789
  • 2
  • 11
  • 29
1
vote
1 answer

how to add libxml2 as dependency to SwiftPM

I want to update one library to use Swift Package Manager. Currently, it based on Carthage/Pods. But it uses libxml2 (#import ) as dependency. I have tried to add spm support but got an error this framework could not be found -> libxml/xmlreader.h I…
swift2geek
  • 1,697
  • 1
  • 20
  • 27
1
vote
1 answer

Finding symbol with dlsym for symbol in namespace

I have a dynamic library I want to load. I have defined a function add(): #include #include "mymath.h" #define EXPORT __attribute__((visibility("default"))) EXPORT int mymath::add(int a, int b) { return a + b; } This symbol sits…
gonczor
  • 3,994
  • 1
  • 21
  • 46
1
vote
0 answers

share allocated memory buffer between c++ dynamic library and main C program

For work with C based socket server framework, we need to transfer data between socket server thread of C-based program and C++ based DLL. Operation system MacOs. Inside DLL everything works fine and we are able to manage OCR core and DB. Inside of…
1
vote
1 answer

Python and C++ integration.Problems with dynamic library

I use Swig.(Mac os 10.13) My shell script: swig -c++ -python -o example_wrap.cpp example.i g++ -c -std=c++17 -fPIC example.cpp g++ -c -std=c++17 -fPIC example_wrap.cpp -o example_wrap.o…