Questions tagged [dynamic-library]
Compiled binaries capable to be loaded in the process address space in runtime.
                                	
	dynamic-library
    
                            
                        
                    
            483
            questions
        
        
            670
            votes
        
        
            34
            answers
        
        
            355k
            views
        
    iOS app with framework crashed on device, dyld: Library not loaded, Xcode 6 Beta
                This crash has been a blocking issue I used the following steps to reproduce the issue:
Create a Cocoa Touch Framework project
Add a swift file and a class Dog
Build a framework for device
Create a ...
            
        
       
    
            238
            votes
        
        
            3
            answers
        
        
            100k
            views
        
    Library? Static? Dynamic? Or Framework? Project inside another project
                I have an existing iOS app and want to add a large chunk of code that I've been developing as another project just for ease of testing. The new chunk basically deals with saving an image to various ...
            
        
       
    
            166
            votes
        
        
            5
            answers
        
        
            106k
            views
        
    Why do we use use_frameworks! in CocoaPods?
                I have used use_frameworks! in CocoaPods Podfile many times. I just wonder why do we use it? I couldn't get the straight forward answer of it.
Example:
platform :ios, '8.0'
use_frameworks!
target &...
            
        
       
    
            151
            votes
        
        
            3
            answers
        
        
            41k
            views
        
    When should we use "embedded binaries" rather than "Linked Frameworks" in Xcode?
                There is a good question about the difference between those two options as described in Link Binary with libraries VS Embed Frameworks.
Seems like we have options to use them both, just wonder which ...
            
        
       
    
            142
            votes
        
        
            20
            answers
        
        
            594k
            views
        
    PHP Warning: PHP Startup: Unable to load dynamic library
                I run a PHP script and get this error:
  PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20090626/ixed.5.2.lin' - /usr/local/lib/php/...
            
        
       
    
            137
            votes
        
        
            3
            answers
        
        
            56k
            views
        
    Difference between framework and static library in xcode4, and how to call them
                I am quite new to xcode and objective-c. I want to ask a very basic question.
I saw that when "linking binary to libraries" in project settings, there are differences about framework and libraries, ...
            
        
       
    
            135
            votes
        
        
            4
            answers
        
        
            56k
            views
        
    "Do Not Embed", "Embed & Sign", "Embed Without Signing". What are they?. What they do?
                We have 3 new options in "Frameworks, Libraries, and Embedded Content" section of Xcode11 Beta for adding libraries.
Xcode Libraries section screenshot
Can anyone explain what they do?
            
        
       
    
            120
            votes
        
        
            5
            answers
        
        
            48k
            views
        
    iOS Static vs Dynamic frameworks clarifications
                I have to admit that with the release of iOS 8 I am a bit confused about dynamic and static frameworks in iOS.
I am looking for a way to distribute a library that I created, and I need to support iOS ...
            
        
       
    
            86
            votes
        
        
            3
            answers
        
        
            19k
            views
        
    Link Binary with libraries VS Embed Frameworks
                What's the difference in the build phases between putting a framework in "Link binary with libraries" or in "Embed frameworks"?
            
        
       
    
            69
            votes
        
        
            15
            answers
        
        
            60k
            views
        
    Xcode 6 and Embedded Frameworks only supported in iOS8
                When using an embedded framework (dyld) in Xcode 6.0.1 with deployment target less that iOS 8 I get:
Build is successful
Runtime library loading error
Error:
dyld: Library not loaded: @rpath/...
            
        
       
    
            51
            votes
        
        
            6
            answers
        
        
            94k
            views
        
    Could not load dynamic library 'libnvinfer.so.6'
                I am trying to normally import the TensorFlow python package, but I get the following error:
Here is the text from the above terminal image:
2020-02-23 19:01:06.163940: W tensorflow/stream_executor/...
            
        
       
    
            51
            votes
        
        
            2
            answers
        
        
            21k
            views
        
    CMake: how to produce binaries "as static as possible"
                I would like to have control over the type of the libraries that get found/linked with my binaries in CMake. The final goal is, to generate binaries "as static as possible" that is to link statically ...
            
        
       
    
            50
            votes
        
        
            11
            answers
        
        
            54k
            views
        
    Xcode 6 iOS Creating a Cocoa Touch Framework - Architectures issues
                I'm trying to make a dynamic framework for an iOS app. Thanks to the new version of Xcode (6) we can select a Cocoa Touch Framework when we create a new project and there is no more need to add an ...
            
        
       
    
            35
            votes
        
        
            3
            answers
        
        
            36k
            views
        
    Meaning of library dl in gcc
                I'm checking a makefile, and see that the libraries used are:
LIBS = -lcppunit -ldl
lcppunit is the unit testing library. What is ldl then?
            
        
       
    
            33
            votes
        
        
            5
            answers
        
        
            19k
            views
        
    Is there a downside to using -Bsymbolic-functions?
                I recently discovered the linker option "-Bsymbolic-functions" in GNU ld:
-Bsymbolic
  When creating a shared library, bind references to global symbols to the 
  definition within the shared library,...
            
        
       
    
            31
            votes
        
        
            3
            answers
        
        
            24k
            views
        
    Linking Rust application with a dynamic library not in the runtime linker search path
                I have a shared library that I'd like to dynamically link into several separate binary Cargo applications.  I include its location in the linker using the -- -L /path/to/dir format and the application ...
            
        
       
    
            27
            votes
        
        
            3
            answers
        
        
            32k
            views
        
    C++ Statically linked shared library
                I have a shared library used by a another application beyond my control which requires *.so objects. My library makes use of sqlite3 which needs to be statically linked with it (I absolutely need a ...
            
        
       
    
            26
            votes
        
        
            9
            answers
        
        
            58k
            views
        
    relocation against xxx in read-only section '.text' - wrong compiler or linux setup in SUSE?
                I'm not a frequent user of Linux and I think I did something wrong.
This is the code for a test dynamic library ".so" I'm generating.
class InternalClass
{
public:
    int Function(){ return ...
            
        
       
    
            23
            votes
        
        
            1
            answer
        
        
            13k
            views
        
    Is the function 'dlopen()' private API?
                I want use function 'dlopen()' to invoke a dynamic library on iOS platform, is the function 'dlopen()' private API?
            
        
       
    
            19
            votes
        
        
            2
            answers
        
        
            5k
            views
        
    Singleton class in a static library
                Suppose I have a singleton class S in a static library, this could be linked with the other dynamic libraries D1 D2 D3, 
So from what I understand the class S will have a separate instance in each D1,...
            
        
       
    
            19
            votes
        
        
            1
            answer
        
        
            7k
            views
        
    clang, change dependent shared library install name at link time
                Related, but do not answer the question:
How do I modify the install name of a .dylib at build time
On OSX, I have a dynamic library provided by a packager manager, installed in a non
standard ...
            
        
       
    
            19
            votes
        
        
            4
            answers
        
        
            8k
            views
        
    Difference between static and dynamic library in Xcode for iPhone
                What is the difference between a static and dynamic library in XCode? And why doesn't Apple allow us to use dynamic libraries in our iOS applications?
            
        
       
    
            18
            votes
        
        
            2
            answers
        
        
            29k
            views
        
    MacOS -- how to link a dynamic library with a relative path using gcc/ld
                If you are trying to understand dynamic linking, this question is likely to be of interest.
One of the answers to that question provides a wonderful example of creating and using a dynamic library.  ...
            
        
       
    
            16
            votes
        
        
            1
            answer
        
        
            16k
            views
        
    Can I export functions of a static library when building a dynamic library linking against that static library?
                On win32, I built a dynamic library called A.dll which linked against a static library called B.lib, and also built a executable called C.exe which only dependent on A.dll.
But now, in C.exe if I ...
            
        
       
    
            14
            votes
        
        
            2
            answers
        
        
            6k
            views
        
    Global variables, shared libraries and -fPIC effect
                I made a piece of code which consists in a dynamic library (lib.c), and a main executable (main.c).
In both files I define a global variable named: int global.
Not very smart but it's not the question....
            
        
       
    
            13
            votes
        
        
            1
            answer
        
        
            2k
            views
        
    Load a Mac binary as a dynamic library
                I am doing some reverse engineering with a binary executable without sources. On Windows what I can do is load an executable file (EXE) with LoadLibrary, just as it was a DLL file. If the loaded file ...
            
        
       
    
            11
            votes
        
        
            2
            answers
        
        
            13k
            views
        
    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 ...
            
        
       
    
            11
            votes
        
        
            3
            answers
        
        
            4k
            views
        
    Manually call a rust dynamic library
                I'm currently playing around with DynamicLibrary.
The code of my dynamic library (compiled with rustc --crate-type dylib dylib.rs):
// dylib.rs
#[no_mangle]
pub fn minicall() -> u8 {
    3u8
}
...
            
        
       
    
            11
            votes
        
        
            0
            answers
        
        
            7k
            views
        
    Debugging a dynamically-loaded library with gdb
                I am trying to debug an application which loads dynamic libraries as plugins, and experiencing problems with gdb to locate the source files and put breakpoints at the source level.
I build a dynamic ...
            
        
       
    
            11
            votes
        
        
            3
            answers
        
        
            890
            views
        
    Xcode Creating a framework that has cocoapods dependencies
                I'm currently developing a framework for internal usage, but I'm having trouble getting it to play nicely. The issue i seem to be having is that the framework uses cocoapods for some of its ...
            
        
       
    
            10
            votes
        
        
            1
            answer
        
        
            4k
            views
        
    What's the meaning of dylib files?
                My C++ compiler creates "dylib" files which contain dynamic libraries. Whats the difference between .dylib and .so files? 
And what is the difference between files in Mach-O format and files in an ...
            
        
       
    
            10
            votes
        
        
            2
            answers
        
        
            1k
            views
        
    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 <iostream>
extern "C" {
int ...
            
        
       
    
            9
            votes
        
        
            4
            answers
        
        
            13k
            views
        
    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 ...
            
        
       
    
            8
            votes
        
        
            7
            answers
        
        
            5k
            views
        
    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 ...
            
        
       
    
            8
            votes
        
        
            2
            answers
        
        
            12k
            views
        
    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 ...
            
        
       
    
            8
            votes
        
        
            1
            answer
        
        
            10k
            views
        
    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 ...
            
        
       
    
            8
            votes
        
        
            1
            answer
        
        
            3k
            views
        
    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 ...
            
        
       
    
            8
            votes
        
        
            3
            answers
        
        
            14k
            views
        
    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 ...
            
        
       
    
            8
            votes
        
        
            2
            answers
        
        
            5k
            views
        
    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 ...
            
        
       
    
            8
            votes
        
        
            1
            answer
        
        
            1k
            views
        
    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: ...
            
        
       
    
            7
            votes
        
        
            6
            answers
        
        
            16k
            views
        
    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 ...
            
        
       
    
            7
            votes
        
        
            2
            answers
        
        
            43k
            views
        
    C++ linux: dlopen can't find .so library
                Reworded Question (although it's been solved already):
I've been having trouble using dlopen(3) to load a shared object library on linux.  The library is part of a system of libraries built by me ...
            
        
       
    
            7
            votes
        
        
            2
            answers
        
        
            14k
            views
        
    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 ...
            
        
       
    
            7
            votes
        
        
            2
            answers
        
        
            26k
            views
        
    How Do I Create a Development Framework In iOS Including Swift?
                My goal in this was to create an iOS framework that incorporates both Swift and Objective-C that I could use in my development projects. The nature of this framework is that the framework itself is ...
            
        
       
    
            7
            votes
        
        
            3
            answers
        
        
            3k
            views
        
    C++: Implement custom Main function
                WinMain is a function that 'replaces' the default main entry point 'main'.
The user can then define its main entry point like 
int WINAPI WinMain(...) { }
How is this kind of encapsulation done?
...
            
        
       
    
            7
            votes
        
        
            2
            answers
        
        
            13k
            views
        
    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 ...
            
        
       
    
            7
            votes
        
        
            1
            answer
        
        
            6k
            views
        
    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 ...
            
        
       
    
            7
            votes
        
        
            2
            answers
        
        
            26k
            views
        
    Setting LD_LIBRARY_PATH environment variable for loading a shared library at runtime (g++)
                I'm having two problems related to the same issue:
I have a shared object saved in `pwd`/lib and while the executable that uses it compiles successfully (by using -l and -L switches), at runtime, it'...
            
        
       
    
            7
            votes
        
        
            4
            answers
        
        
            5k
            views
        
    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 ...
            
        
       
    
            7
            votes
        
        
            2
            answers
        
        
            5k
            views
        
    How to compile ELF binary so that it can be loaded as dynamic library? [duplicate]
                This is theoretical question. I am aware that perhaps best practice would be the use of shared libraries. But I ran into this question and cannot seem to find an answer anywhere.
How to construct the ...