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

C++ Api design, shared object/dynamic library

I wanted to ask a question regarding good Api desing in C++. I want to expose some functionality through an API which will be provided as a shared object/dynamic library in unix and ios however this API will need to initialise some classes that…
computador7
  • 170
  • 6
1
vote
2 answers

Copy and pasting .so file doesn't work with linker

I compiled and built the casablanca c++ rest library in my home directory where my absolute path to the necessary .so file was /home/dev/casablanca/Release/build.release/Binaries/libcpprest.so. What I wanted to do was to simply cp and past that .so…
Dr.Knowitall
  • 10,080
  • 23
  • 82
  • 133
1
vote
2 answers

dylib is not able to load, refreneced from other dylibs

I am getting following error when i try to execute my executable: **Dyld Error Message: Library not loaded: /Library/Application support/XYZ/a.dylib Referenced from :/Library/Application support/ABC/b.dylib Reason: image not found** I have used…
1
vote
2 answers

Indirect pointers to mapped libraries functions assignment - C - OSX

Given the following simple code snippet: int main (void) { void* foo = scanf; void* bar = sscanf; } Here's the disassembly (Taken from the mach-o executable): Small part of the non-lazy symbol pointers: Small part of the symbol table: I…
Rouki
  • 2,239
  • 1
  • 24
  • 41
1
vote
1 answer

How to link a dynamic library Xcode 5

Can you point me to a tutorial which shows how to link to a dynamic library. I created a dynamic library. Now I've got no clue how to include it into your project. What I tried is 1.I copied the dylib and header folder into my project. 2. I gave…
Adwait
  • 290
  • 2
  • 11
1
vote
1 answer

Understanding why gcc/ld are linking a symbol from a particular library using readelf

I'm including several libraries with gcc (-llapacke -llapack -lcblas) and I'm receiving "undefined reference" errors unless I explicitly link to the static version of one them (lapacke). I'm trying to understand why by searching the various variants…
Emre
  • 5,976
  • 7
  • 29
  • 42
1
vote
0 answers

What is the application of dynamic loading in c programming?

In witch situation we need to use dynamic loading instead of dynamic linking? In advanced linux programming I read that it used for writing plugins, any one could explain more?
Milad Khajavi
  • 2,769
  • 9
  • 41
  • 66
1
vote
1 answer

dynamic library function cast

A newbie question about shared library: In C, when loading a dynamic library, we use dlopen and then dlsym to find a symbol or a function. Now let say, the function we look for in the dll is typed as: int add(int a, int b); but if we cast it to…
Alfred
  • 1,709
  • 8
  • 23
  • 38
1
vote
0 answers

Error running makefile with dynamic libraries ("Undefined Reference)" bash shell

So, I have been driving myself crazy trying to get this makefile to work. I am trying to take three .c source files and 2.h header files and work them together using a single makefile to set them up with dynamic libraries. Here is the…
Starlncr34
  • 31
  • 1
  • 6
1
vote
1 answer

Loading Dynamic Libraries on Outisde Computers

so I built my project and it runs just fine on my own computer, but it does not run on others's. The reason is because I am using the GMP library which is not on their system, so I am wondering how do I fix that? The console spit this error message…
jundl77
  • 476
  • 2
  • 15
1
vote
1 answer

C++ How to User Dynamic Library(.so file)

I have myLib.so file and USB.h header file. My header file looks like this and myLib.so contains implementation of this header file. How can I use myLib.so to call getUsbList function in my main.cpp. #ifndef USB_H #define USB_H #include…
dijkstra
  • 1,068
  • 2
  • 16
  • 39
1
vote
1 answer

Dynamically linked library under iOS AppStore

I want to use dynamically linked libraries in my iOs app. My problem is that I read that I can use only static libraries. I searched about that on official Apple web side but I cant find anything about this. Can someone point me the link to official…
AYMADA
  • 889
  • 3
  • 17
  • 37
1
vote
3 answers

Packet Tracer Libraries Needed (Debian)

I was able, easily, to download and install this on Ubuntu with the .deb file. I am currently using Crunchbang and I simply cannot get it to install. Running it, I get error after error asking for library after library. After installing all of these…
Goodies
  • 4,439
  • 3
  • 31
  • 57
1
vote
0 answers

Clean installation of a MATLAB library on Windows

I would like to create an installer for a library (DLL) that can be use in multiple system including MATLAB. For MATLAB, I have additional *.m and *.mex files to make the DLL functions easily accessible from it. I also have an installer that modify…
syl
  • 41
  • 5
1
vote
1 answer

When you instantiate a subclass from a DLL, is the vtable correct?

When you have a base class in your main executable and subclasses (say, plugins) defined in DLLs, what happens when you want to get a plugin? I am looking for an article/answer that'd clarify what happens when you load a DLL call a DLL's function…
Kalamar Obliwy
  • 861
  • 2
  • 8
  • 13