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

Tricky error using OpenMP in function loaded from dynamic libraries

My question concerns the use of OpenMP in C++ functions stored in dynamic libraries. Let's consider the following code (in shared.cpp): #include "omp.h" #include extern "C" { int test() { int N = omp_get_max_threads(); #pragma omp…
ThomasI
  • 109
  • 7
9
votes
2 answers

Python ctypes return values question

Why if i have this simple code void voidFunct() { printf("voidFunct called!!!\n"); } I compile it as a dynamic library with gcc -c LSB.c -o LSB.o gcc -shared -Wl -o libLSB.so.1 LSB.o And i call function from a python interpreter, using…
Emilio
  • 3,901
  • 11
  • 44
  • 50
9
votes
4 answers

Compiling Lua - create .so files?

I am compiling Lua 5.2.3 on Centos 6.5, and the compilation / install works fine. However, I also need the development libraries for another program to compile. I would usually install these by doing this : yum install lua-devel Problem is that…
David Wylie
  • 637
  • 1
  • 8
  • 24
8
votes
3 answers

dlopen() error image not found

I have software that first loads a .dylib lets call libFirst.dylib using the following command: void* handle = dlopen(path.c_str(), RTLD_LAZY | RTLD_GLOBAL); Later on inside a function from the loaded libFirst.dylib I attempt to load another .dylib…
Michael Wildermuth
  • 5,762
  • 3
  • 29
  • 48
8
votes
2 answers

Why I receive error LNK1561 "Entry point must be defined" when I compile a DLL Project?

I try to compile a very simple dynamic library project as .dll file. The name of the project is "Library". I'm using Visual Studio 2015 and the project properties are these: Debug Properties Release Properties In the project there are two files…
Radioga
  • 416
  • 1
  • 5
  • 16
8
votes
1 answer

Xcode 7.2 Dynamic Framework 32 bit device error

We've a large project having multiple apps, So we've moved common code into single dynamic framework. So far running fine on 64 bit devices, but having a crash on 32 bit devices as follow: dyld: REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB has segment…
Adil Soomro
  • 37,609
  • 9
  • 103
  • 153
8
votes
2 answers

Sharing swift code over multiple projects

So we have a few projects that share code, and they have to remain compatible to at least iOS7 for now. Currently we use local cocoapods to share code between different applications. This has the downside that all shared code is being put in one…
Kevin R
  • 8,230
  • 4
  • 41
  • 46
8
votes
1 answer

How to create a Dynamic Library in D?

I want to create a Dynamic library (cross-platform) in D, so I did some Googling. After some time I found this page. I am absolutely stunned by how much complexities there are in writing, compiling and even linking to a DLL. Isn't there a uniform…
Jeroen
  • 15,257
  • 12
  • 59
  • 102
8
votes
7 answers

Dynamic Libraries, plugin frameworks, and function pointer casting in c++

I am trying to create a very open plugin framework in c++, and it seems to me that I have come up with a way to do so, but a nagging thought keeps telling me that there is something very, very wrong with what I am doing, and it either won't work or…
MirroredFate
  • 12,396
  • 14
  • 68
  • 100
7
votes
1 answer

Create STATIC and SHARED libraries with Clang

What is the minimal commmand line way to create an static and a dynamic library with Clang under Linux and Windows, and then, link it against an executable? Suppose the project contains a main.cpp file with the main function, an lib_header.h file…
Alex Vergara
  • 1,766
  • 1
  • 10
  • 29
7
votes
6 answers

How can I create objective-C Framework for iOS Application

I am in the middle of creating some generic classes that can be reusable for lot of application. For Eg: Share Functions - if we need this functionality in a project then we currently I need to add a group of classes into that project and display…
Naveen Shan
  • 9,192
  • 3
  • 29
  • 43
7
votes
1 answer

Embedding a .dylib inside a framework for iOS

I've been trying to submit a Swift app with an Obj-C Dynamic Library (.dylib) which keeps getting rejected by the iOS App Store with error messages such as Invalid Swift Support - The files libswiftDarwin.dylib, libswiftDispatch.dylib,…
Adamski
  • 3,585
  • 5
  • 42
  • 78
7
votes
2 answers

How to debug dylib with Xcode?

I have a Xcode project for library arith. I could build it with debug configuration, and I need to debug it. How can I do that? The ideal method would be to set up a test code to build an execution in a project file, and then set a breakpoint in a…
prosseek
  • 182,215
  • 215
  • 566
  • 871
7
votes
4 answers

Size difference between static and dynamic (debug) library and impact on final exe

I never put much thought into the size difference between a static library and a dynamic library until I downloaded pre-built libraries of boost today. I found that the static libraries of boost are much much bigger than the dynamic libraries. For…
7
votes
2 answers

Xcode linking against static and dynamic library

I have some problems with linking my macOS app against C libraries. I have several question related to this issue. It is better to link app against dynamic or static libraries taking into account that this will be very custom libraries rather not…
Michał Ziobro
  • 10,759
  • 11
  • 88
  • 143
1 2
3
32 33