1,651 questions
Score of 11
1 answer
517 views
Dynamically link against C library under macOS
I have a C interpreter that I'm trying to get working again under modern macOS. I want to use dlopen() to open the C library .dylib file, so that I can call functions like printf() dynamically.
Once ...
Score of 3
1 answer
156 views
How can I dynamically load xcframeworks only when they are used, not at the start of the app?
I am distributing a proprietary iOS SDK as a binary xcframework. The SDK includes some features that require other, external dependencies (also xcframeworks) to work.
The external dependencies are ...
Score of 2
0 answers
123 views
How do I link a custom SQLite and not the system version when building Python? [closed]
I am trying to link a custom version of sqlite3 when building Python, but there is an error when compiling Python:
/usr/bin/install: cannot stat 'Modules/_sqlite3.cpython-313-x86_64-linux-gnu.so': No ...
Score of 0
2 answers
60 views
With g++, how can I have class member symbols evaluated at runtime instead of link time?
I have a library from a vendor, for non-technical reasons this library needs to be treated as immutable. This library is used as a relatively small portion of a very large software project, but the ...
Score of -2
2 answers
218 views
How could I link executable code to dynamic library [duplicate]
I have cross platform dynamic library and executable.
In the executable I have struct with implemented static function inside.
In the dynamic library I have same definition of struct and static ...
Score of 2
1 answer
313 views
When are the dynamic/static libraries linked on compile, link, load or run time?
I found this question about the difference between .a and .so files
First Linking the dynamic libraries:
One answer says:
The advantage of .so (shared object) over .a library is that they are linked ...
Score of 0
0 answers
265 views
cross compiling cpp code for windows using mingw32 generates error with libstdc++-6.dll
I'm developing in C++ on Windows 11 using WSL with an Ubuntu 24.04.2 LTS distribution. For my course projects, I use the SDL2 library. Due to insufficient performance with graphical interfaces under ...
Score of 4
1 answer
172 views
How to Proxy CUDA Functions Without Explicitly Declaring Them All?
I'm trying to intercept CUDA driver API calls (like cuInit) by creating a proxy library (libcuda_override.so) that forwards calls to the real libcuda.so. My current approach:
Setup:
libcuda.so.1 ...
Score of 2
1 answer
153 views
dlopen() takes ages when used on a freshly created file
I've noticed that on macOS dlopen is massively slower when used on a freshly created file than when used to open the very same file already existing on disk. Take a look at the following little demo ...
Score of 0
1 answer
367 views
How to solve "Fork server handshake failed" when starting afl-fuzz with a bin-only dynamic linked program from a firmware?
I'm trying to start a fuzzing test using QEMU mode with a simple binary file named dos2unix from a Linux x86 rootfs firmware(from an IOT device).
BusyBox v1.24.2 (2019-06-25 00:47:00 UTC) multi-call ...
Score of 0
0 answers
84 views
How to generate an import library for an EXE during compilation so that it can be used as a DLL?
Similar questions have been asked over the years and the answers have always been quite literally the opposite of each other (see: here, here, here, and here). However, I have not come across answers ...
Score of 2
0 answers
65 views
How to include only one copy of a dynamic library in memory between a framework and a program in Xcode
I have an Xcode project which includes an engine, which is compiled and embedded as a framework within my game. The engine and game need access to a custom dynamically linked library for graphics. To ...
Score of 0
1 answer
102 views
Exporting dynamic symbols for an exe C/C++
I am trying to export symbols of my executable so that I can perform dlsym on it. The issue I face here is by default symbol is not getting exposed for dynamic linking.
I have tried using -Wl,--export-...
Score of -2
1 answer
168 views
Removing library dependency in c++
I have lib2 that depends on for some small functionality on a large lib1. I want to deliver lib2 but not lib1 to a client that builds executables based on lib2. lib1 is only used for implementations ...
Score of 2
2 answers
158 views
Linking two versions of the shared library in one app
Basic problem description:
Application uses library A 1.0.
Library B uses newer version of library A 2.0 with incompatible ABI/behavior.
Application wants to use older version of library A 1.0 and B ...