Skip to main content
0 votes
0 answers
82 views

library handle in fortran

I have a fortran dll/so which needs to know its own programhandle. On windows, I can obtain the handle from the DLLMain routine: integer(4) function DllMain(hInst, ul_reason_being_called, lpReserved) ...
Mads M Pedersen's user avatar
1 vote
1 answer
109 views

Optional library without dlopen/LoadLibrary

Does Linux and/or Windows have a way to mark a dynamic library as optional, so that if it does exist, it is loaded and used to populate the symbol table, but if it does not, then the symbols are left ...
Dominik Kaszewski's user avatar
0 votes
0 answers
97 views

Unable to reload a C# dll from C#

Good morning. I want to reload a dll at runtime but I can't. I have two programs lets name them host and plugin. Host compiles to an executable and plugin compiles to a dll. Host loads a function from ...
apilatosba's user avatar
0 votes
1 answer
47 views

Why doesn't RTLD_LOCAL solve this symbol conflict when loading dynamic libraries?

I have one dynamic library with the function: extern "C" void start() { } And a second dynamic library with the function: extern "C" void start() { } Exactly the same. I open up ...
Zebrafish's user avatar
  • 16.3k
0 votes
1 answer
36 views

Free Pascal dylib exports with name clauses not findable via dlsym on macOS

I'm creating a Free Pascal dynamic library (.dylib) on macOS that works on Windows but fails to load symbols on macOS. The symbols appear in the symbol table when checked with nm, but dlsym cannot ...
Bilko's user avatar
  • 348
-2 votes
1 answer
154 views

Calling Vulkan function at program exit results in segmentation fault [closed]

In C++ it's a good idea to wrap any cleanup in the destructor of an object, and so my Vulkan objects look something like: struct MyVulkanObject { VkCommandPool handle; ~MyVulkanObject() ...
Zebrafish's user avatar
  • 16.3k
1 vote
0 answers
96 views

Why is a release build dynamic library function slow when called from a debug build executable?

I'm trying to set up the Slang shader compiler, and the first step is to create a global session with: SlangResult slang_result = slang::createGlobalSession(); This takes a long time, like 5 seconds ...
Zebrafish's user avatar
  • 16.3k
1 vote
1 answer
131 views

Crash when dlopening shared library which accesses global variable in constructor

This simple library $ cat foo.c int glob; int foo() { return 0; } __attribute__((constructor)) void init() { glob = foo(); } $ gcc -g -O0 -shared -fPIC foo.c -o libfoo.so loads fine when I ...
yugr's user avatar
  • 22.6k
0 votes
1 answer
467 views

Loading external Native Libraries to the JVM at Runtime in Java 21

I want to load an external library (eg:\Lic\64bit) which contains some DLL files inside it to JVM at runtime. Can't use Reflection and FFM (Java Foreign Function Memory API) as well. I tried with some ...
Anjana's user avatar
  • 1
0 votes
0 answers
70 views

Right way to avoid multiple definition error when building Python C++ extension with MSVC BuildTools

A python C++ extension has the following structure: /myextension |_____basecode | |__header.h | |__functions.cpp | |_____utilities | |______utilities.h | |...
subhacom's user avatar
  • 919
0 votes
0 answers
44 views

What could be the reason for openmp to constantly recreate the thread pool?

My program runs on linux, and uses a openmp-enabled dynamic library (named calc.so) for fast parallel computation, calc.so exports this function double calc(double* data). When the program is running, ...
Xiaoyong Guo's user avatar
1 vote
1 answer
109 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 ...
drets's user avatar
  • 2,825
0 votes
1 answer
154 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 ...
Quentin's user avatar
  • 79
0 votes
1 answer
360 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: ...
Kęstutis Ramulionis's user avatar
1 vote
1 answer
285 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 ...
1ups_'s user avatar
  • 47

15 30 50 per page
1
2 3 4 5
33