shared-libraries

unable to compile with library

限于喜欢 提交于 2019-12-25 02:15:34
问题 I would like to experiment with the OpenALPR SDK and have written a little test program. The problem is, I can't get it to compile properly and I'm not sure why. Here's the SDK documentation. My source file looks like: $ cat test.cpp #include <alpr.h> #include <iostream> std::string key = "MyKey"; int main (void) { alpr::Alpr openalpr("us", "/etc/openalpr/openalpr.conf", "/usr/share/openalpr/runtime_data/", key); // Make sure the library loaded before continuing. // For example, it could fail

Why do we need -rdynamic option in gcc? [duplicate]

那年仲夏 提交于 2019-12-25 01:36:02
问题 This question already has answers here : What exactly does `-rdynamic` do and when exactly is it needed? (3 answers) Closed last year . By default all symbols are exported to dynamic table, so why would we use -rdynamic flag? Even if we hide some symbols via attributes/ -fvisibility=hidden - -rdynamic doesn't change result, it doesn't unhide previously hidden symbols. So what's the point in it? 回答1: Symbols are only exported by default from shared libraries. -rdynamic tells linker to do the

Android System.loadLibrary stalls while loading native library

女生的网名这么多〃 提交于 2019-12-25 00:05:52
问题 I have a rather large shared library file (= 12megabytes) which does not contain any JNI code whatsoever. When calling System.loadLibrary("some_file") the method never returns and no relevant output is generated. Also, Windows Taskmanager reports that the emulator instance is not hogging all the CPU power. I have a class with the following code: static { System.out.println("Trying"); System.loadLibrary("some_file"); System.out.println("Works"); } Here is the output given from LogCat: I/System

Unload shared library inside ctypes loaded shared library

僤鯓⒐⒋嵵緔 提交于 2019-12-24 22:26:14
问题 I'm calling a so file from my python script. As far as I understand, I don't really need to free shared library that is opened in python using ctypes. However, inside my so file code, it dlopens another so file and doesn't do dlclose(). In this case, is it safe to use from the python side? Don't I have to free the shared library that opened inside ctypes loade so file? 回答1: The rule Clean up after yourself always applies (although modern technologies take care of the cleaning aspect for you).

install JRE in heroku

故事扮演 提交于 2019-12-24 20:40:30
问题 I got this error in running heroku run rake sunspot:solr:run rake aborted! You need a Java Runtime Environment to run the Solr server is there a way i can install jre in heroku? 回答1: You cannot install the JRE on Heroku, and thus you cannot run Solr from a Heroku worker. If you want Solr in Heroku, you'll have to use the Websolr addon, or start an EC2 server and run your own copy of Solr from there. 来源: https://stackoverflow.com/questions/10741219/install-jre-in-heroku

python shared library not found in R reticulate

丶灬走出姿态 提交于 2019-12-24 18:58:55
问题 I am having trouble getting the reticulate package in R to work. It cannot find the shared LIBPYTHON file it needs, no matter which version of Python I have loaded via module load , or which version I tell reticulate to use, directly within R. I'm working on the universty's cluster, which has several versions of Python installed and are loaded via modules. Thank you for your help. a) Using version 2.7.9 (default version from module load CBC ) : > reticulate::py_discover_config() python: /opt

How to link shared libraries in custom path directly without specifying RPATH?

强颜欢笑 提交于 2019-12-24 18:40:29
问题 I am on Ubuntu 16.04, and I am required to use an external library (MCR). It puts all of it's shared libraries inside the MATLAB/bin/glnxa64/ folder. I only need the libmx.so in there but there are libraries in there that has the exact same name as the ones in /usr/lib but they are actually different (because the file size is different), for example libtiff.so.5 . This becomes a problem because when I use the find_library function in CMake to add MATLAB/bin/glnxa64/ into RPATH in order to

Is the SO tag ordering a good representation of programming language popularity?

最后都变了- 提交于 2019-12-24 18:10:25
问题 Is the SO tag ordering a good representation of programming language popularity? My first guess would be that it's not and that it's largely populated by fans of Jeff (who would probably be .Net biased) and fans of Joel (who may be more C/C++ biased among others). Is there a way to get unbiased programming language popularity stats? 回答1: I'm the creator of LangPop.com, which measures a number of metrics to try and gauge popularity. My philosophy is to simply try and measure a lot of different

Cannot access Memory at address function parameter passing issue

时光总嘲笑我的痴心妄想 提交于 2019-12-24 17:14:23
问题 In my main() function I have a local variable: datastruct pdw_frame; I fill it with data and pass it to two functions that are on adjacent lines in main() , e.g. datastruct_to_pdw(&pdw_frame, 0, &pdw); /* ok */ hash_streams = get_streams(&pdw_frame, &result_frame); /* not ok */ whilst stepping into datastruct_to_pdw() with gdb I can look at the 1st function parameter no problem, e.g. (gdb) p *pdw_frame returns a description of the struct however, when stepping into the 2nd function and trying

GDB can't find source file

浪子不回头ぞ 提交于 2019-12-24 15:59:28
问题 I am trying to debug into OpenCV code but gdb fails to load the OpenCV source file. Checking for the source file existence: $ls -l /home/rui/DriveSo/opencv/modules/core/src/matrix.cpp -rw-r--r-- 1 rui rui 156046 May 11 21:46 /home/rui/DriveSo/opencv/modules/core/src/matrix.cpp After linking with OpenCV Debug mode libraries I start dbg and add this to the list of source directories : $gdb DriveSo GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1 .... Reading symbols from DriveSo...done. (gdb) directory