shared-libraries

Cmake undefined reference to symbol 'dlsym@@GLIBC_2.2.5 even though I link with -ldl

≯℡__Kan透↙ 提交于 2021-01-29 06:43:47
问题 I'm getting undefined reference to dlsym@@GLIBC_2.2.5 even after linking it before and after the libraries. However in the linking output it appears that it's linking just before, but linking before all libraries should work, I guess. /bin/g++-9 CMakeFiles/http_downloader.dir/http_downloader_cli.cpp.o CMakeFiles/http_downloader.dir/SimpleOpenVPNSocket.cpp.o -o http_downloader -lpthread /usr/lib/x86_64-linux-gnu/libssl.so /usr/lib/x86_64-linux-gnu/liblz4.so -ldl downloader/libhttp_downloader

Running Q on page with Require.js

可紊 提交于 2021-01-29 05:17:41
问题 I am trying to run a widget on a web page that leverages the Q library . Unfortunately, the page also uses the AddThis widget which embeds require.js and is causing a conflict. Specifically, when run together the two following error messages are displayed in the console: Uncaught ReferenceError: Q is not defined Uncaught Error: Mismatched anonymous define() module Unfortunately, I don't have control over the use of the AddThis widget. However, I do have control over the embedded application

Can NOT authorize calling Script for new ScriptDb when Included Library remains from previously deleted ScriptDb.

寵の児 提交于 2021-01-28 05:53:47
问题 I deleted a ScriptDb BEFORE I removed its reference from the Resources -> Installed Libraries of the calling script. I created a new ScriptDb with the same name as the old ScriptDb. When I run the calling script, I get the following message: Library with identifier libraryDb is missing (perhaps it was deleted?) When I open Resources -> Installed Libraries in the calling script, I get the following message: We're sorry, a server error occurred. Please wait a bit and try again. And when I click

How can a shared library know where it resides?

拥有回忆 提交于 2021-01-28 00:44:31
问题 I'm developing a shared library for linux machines, which is dynamically loaded relative to the main executable with rpath. Now, the library itself tries to load other libraries dynamically relative to its location but without rpath (I use scandir to search for shared libraries in a certain folder - I don't know their names yet). This works only, if the working directory is set to the shared libraries location, as otherwise I look in a different directory as intended. Is there any practical,

Resolving C/C++ library version conflicts, mainly on Linux

南笙酒味 提交于 2021-01-27 20:30:36
问题 I have a situation more or less as illustrated here; it exists both on Windows and Linux, but I’ll draw it using Linux notation which is slightly clearer: libbar.so.1 and libbar.so.2 contain procedures with the same names and signatures but different behaviours. If I link the applications ‘naïvely’, then symbols from the library that is loaded last will ‘hide’ the ones from the one that is loaded first (at least, if I understand this reference correctly) and I have no way of using both

How to configure VS Code to be able to step into a shared library (.so) that is loaded when debugging a Python script?

佐手、 提交于 2021-01-27 20:23:17
问题 Using gdb from the command line I'm able to break when the shared library is loaded. How can I get the same behavior in VS Code knowing that I have the source code of the shared library? 回答1: For me it works somehow. Here's my setup: Ubuntu 18.04, debugging a C++ shared library I load from Python3 (more specifically - via Cython, but IIRC it worked equally well when loading a .so through ctypes, also I remember it working when debugging a pure C lib in a similar setup) in VSCode I have a

Installing libgc on OSX (Boehm's Garbage Collector)

老子叫甜甜 提交于 2021-01-27 18:40:22
问题 I've started by using reference counting in my library I'm making. It's a pretty decent solution and the increments and decrements don't waste many resources as some people wrongly seem to think. Also the slight extra memory for reference counts is negligible. But apparently tracing garbage collection is so good that it is better than using malloc/free. I'm not sure if this is true so I'd like to try it out (Back-end optimisations by freeing multiple objects at once?). Also GC would make my

ldd outputs statically linked on a shared library

╄→尐↘猪︶ㄣ 提交于 2021-01-27 17:04:10
问题 I am trying to create a shared library libddv3djava.so I compile sources for libddv3djava.so like so: ~/Programming/intellijprojects/ddv3dbindingstest/src $ g++ -c -Wall -Werror -I. -I /usr/lib/jvm/java-8-oracle/include/ -I /usr/lib/jvm/java-8-oracle/include/linux/ -fpic com_ddv3d_Ddv3dBinding.cpp Creating libddv3djava.so: ~/Programming/intellijprojects/ddv3dbindingstest/src $ g++ -shared -o libddv3djava.so com_ddv3d_Ddv3dBinding.o When I do ldd on libddv3djava.so: ~/Programming

Is __attribute__((constructor)) guaranteed to be called exactly once?

偶尔善良 提交于 2021-01-27 05:20:33
问题 Are GCC shared-library constructors and destructors, defined with __attribute__((constructor)) and __attribute__((destructor)) , guaranteed to run exactly once? The documentation seems to imply that they will be run at least once, but doesn't mention anything about more than once. In other words, if I do an operation in the constructor that must be done only once, do I need to protect it like so: static gboolean constructor_has_run = FALSE; if(!constructor_has_run) { do_operation();

Android: requires unavailable shared library com.google.android.maps; failing

会有一股神秘感。 提交于 2021-01-27 04:09:27
问题 First of all, I set the Project Build Target in project\properties\android. I created AVD with Level 7 and 8 with Google APIs, set each AVD only the SD card size 4Gb, set the min version of SDK to 7 the target SDK to 8 in Manifest file. Without success. I delete all AVD and recreate those. After I reinstall Eclipse Rcp, Installed ADT in Eclipse, and Installed Android SDK, and create AVDs again. My GPS application is worked fine without Google APIs, in the earlier version I currently