Category : dynamic-loading

cppreference states the following on thread_local variables The storage for the object is allocated when the thread begins and deallocated when the thread ends. Each thread has its own instance of the object. Only objects declared thread_local have this storage duration. I think of using a thread_local static member variable declared inside a shared library ..

Read more

I have a dll (let’s call it mydll.so) that is dependent to an external application, i.e. Matlab. To dynamically load mydll.so, I have written a code like this (Ubuntu, g++ 4.8.5, qt 5.12.6): // update LD_LIBRARY_PATH with ALL required paths (Matlab, boost, etc.) qputenv("LD_LIBRARY_PATH", required_path.toStdString().c_str()); // loading the dll QLibrary my_dll; my_dll.setFileName(dll_path); if (!my_dll.load()) { ..

Read more