Questions tagged [dynamic-library]
Compiled binaries capable to be loaded in the process address space in runtime.
dynamic-library
479
questions
1
vote
1
answer
75
views
Call function from dynamic library with changing signature?
Say I have hello1.c
char *greeting = "Hello, Version 1";
char *greet(void) {
return greeting;
}
and hello2.c
int greeting = 42;
int greet(void) {
return greeting;
}
My host.c looks ...
0
votes
1
answer
87
views
Segfault on calling function pointer obtained with dlopen() in Rust
I am currently playing with POSIX functions defined in dlfcn.h with Rust, with the goal of calling a function in a separated .so file.
The project actually contains 2 crates:
The binary loading the ...
0
votes
1
answer
97
views
Flutter Dart DynamicLibrary on separate thread (Isolate) can't be called
I have application written on Flutter (Dart) and I have integrated FFI library. I need to call a method from that library on a separate Isolate but it gives me a following error:
Unhandled Exception: ...
0
votes
0
answers
35
views
Different behaviour of UIKit
Recently I have encountered a crash about UIGraphicsBeginImageContext.
The fact is that if you build the project with XCode15 and run the app on iOS17, it will crash. But if you build the project with ...
1
vote
1
answer
58
views
Link shared library through makefile
The code compiles as it should, but somehow, the binary file doesn't know where the library is.
❯ ldd myteams_cli
linux-vdso.so.1 (0x00007ffcbc1b4000)
libmyteams.so => not found
...
0
votes
0
answers
31
views
Is mixing dynamic and shared libraries a good idea when creating an ODBC Driver?
I am creating an ODBC driver (which is, by nature, distributed as a shared library) and don't want the users to have to find and install all of the dependencies.
Looking at how I might statically link ...
0
votes
2
answers
139
views
Link OpenCV library to a Scala project
I've been trying to run a Scala project that uses the library OpenCV. I am using maven to build the project and in the pom.xml file I have the following dependency:
<dependency>
<groupId&...
0
votes
1
answer
118
views
Is there a better way to define multiple function definitions when using a dynamic library?
The following code listing works just fine - but as I'm still dipping my toes into the C++ waters, I'm wondering if there is a better - more generic - way to define each of the function definitions.
I ...
2
votes
1
answer
193
views
What does C++ standard say about dynamic libraries?
What does C++ standard say about dynamic libraries? I heard that it completely ignores them (for some reason) - if it's true, why so?
1
vote
0
answers
88
views
Exposing common API from main program *to* dylib in Rust
I'm planning on making a game in Rust, and I'd like to have native plugins/mods in the form of dynamic libraries. I'm planning on using libloading for this.
Mods will be able to add new entities and ...
0
votes
1
answer
99
views
failed to find version script file when linking a dynamic library by using bazel cluster
I was building a shared/dynamic library by using bazel. The rules in Build file are like below
cc_library(
name = "a",
srcs = ["a.cc"]
)
filegroup(
name = "vis_ld&...
1
vote
2
answers
488
views
What is a real purpose of dynamic linking in c++?
I'm new to this and don't understand why I should use dynamic linking when there is static linking.
I know that dynamic linking reduces the size of the program file, but if it is a custom dynamic ...
0
votes
0
answers
45
views
use shared library with eclipse on windows
On Windows 10, using eclipse for c projects I have installed the MinGW compiler. I've been able to add a static library (*.h, *.c files). I can't for some reason get a shared library to work.
I ...
3
votes
2
answers
109
views
I want to release a C dynamic library for linux. At run time, will it be compatible with any linux version?
My little open-source C/C++ project also offers precompiled dynamic libraries to allow other languages to bind. For Windows I just provide x86 and x64 versions. For Macos, I propose an intel x64 ...
-1
votes
1
answer
678
views
How can I use a library without a header file path in cmake?
I'm trying to create a simple library using cmake and create an app that uses it.
However, while creating an app, I must specify the path to the header file used in the library for the build to ...