shared-libraries

visual studio 2015 android is missing .mk files for NDK native development

安稳与你 提交于 2020-01-02 09:59:53
问题 I am using Visual Studio 2015 to compile and test Android native c++ code. I really need to use LOCAL_SHARED_LIBRARIES in android.mk file to use shared native library. But Visual Studio 2015 doesn't even have .mk files. Instead a bunch of XMLs is used. Please help me. 来源: https://stackoverflow.com/questions/36219677/visual-studio-2015-android-is-missing-mk-files-for-ndk-native-development

Distributing (native C++) libraries on windows

本秂侑毒 提交于 2020-01-02 09:38:14
问题 I would like to share a library I've written in native C++ with a third party. By that I mean I'd like to share a library providing functionality I've developed with someone who is using windows, whom I do not wish to share source code with. We can assume the same CPU architecture here. I've only ever shared source code directly, and mostly on linux. So the standard process of ensuring I can provide a binary that is as versatile as possible is a mystery to me. And I find documentation online

Can I access to symbols of the host process from a shared object loaded in runtime? Any alternative?

倾然丶 夕夏残阳落幕 提交于 2020-01-02 07:26:45
问题 In my scenario I want a plugin, which is a shared object loaded in runtime, to access symbols from the “host application” so I can add any functionality to my application. I have tried but have not found any way to do this and I have no clue on whether this is possible or not. So, can I do this somehow or is there any alternative that applications that use plugins use? I am on Fedora 15, Linux 2.6.4. However, I hope the solution will be cross-platform. 回答1: There are three main approaches:

Add a native lib to an APK

∥☆過路亽.° 提交于 2020-01-02 05:51:12
问题 I'm developing an Android application that uses native code. I need to add an external native library to my APK's lib folder on every build. How can I do that? Thanks. 回答1: Put the library in the native library path which defaults to "libs" in your project folder. If you built the native code for the 'armeabi' target then put it under libs/armeabi. If it was built with armeabi-v7a then put it under libs/armeabi-v7a. <project>/libs/armeabi/libstuff.so 来源: https://stackoverflow.com/questions

Add a native lib to an APK

*爱你&永不变心* 提交于 2020-01-02 05:51:05
问题 I'm developing an Android application that uses native code. I need to add an external native library to my APK's lib folder on every build. How can I do that? Thanks. 回答1: Put the library in the native library path which defaults to "libs" in your project folder. If you built the native code for the 'armeabi' target then put it under libs/armeabi. If it was built with armeabi-v7a then put it under libs/armeabi-v7a. <project>/libs/armeabi/libstuff.so 来源: https://stackoverflow.com/questions

Rmpi unable to load shared libraries as non root user

懵懂的女人 提交于 2020-01-02 02:02:06
问题 I'm having a problem with Rmpi wherein I try to load it and I get this error message: > library('Rmpi') Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library '/usr/lib64/R/library/Rmpi/libs/Rmpi.so': libmpi.so.0: cannot open shared object file: No such file or directory In addition: Warning message: .Last.lib failed in detach() for 'Rmpi', details: call: dyn.unload(file.path(libpath, "libs", paste("Rmpi", .Platform$dynlib.ext, error: dynamic/shared library '/usr

How to add shared library search path to a executable file?

喜夏-厌秋 提交于 2020-01-02 01:55:16
问题 I build the ffmpeg with librtmp. My librtmp is at /opt/librtmp/lib. When I execute the ffmpeg, it said: ./ffmpeg: error while loading shared libraries: librtmp.so.0: cannot open shared object file: No such file or directory I use ldd command it displays not found : [qty@testing bin]# ldd ffmpeg linux-vdso.so.1 => (0x00007fff15576000) librtmp.so.0 => not found libz.so.1 => /lib64/libz.so.1 (0x00002b9a71e10000) libm.so.6 => /lib64/libm.so.6 (0x00002b9a72025000) libpthread.so.0 => /lib64

Making a 64 bit shared library that dynamically links to a 32 bit library on Mac OS X Snow Leopard

[亡魂溺海] 提交于 2020-01-01 19:25:08
问题 Update: After some more reading I see that this problem is totally general, you can't mix architectures in the same process, so 64 bit Java cannot dlopen() a 32 bit library like FMOD. Is there any possible workaround for this, keeping in mind I'm writing my own C interface to the FMOD library? I need to make a 64-bit dylib on Max OS X because Java Native Access only likes 64-bit libraries on 64-bit machines. The problem is, my C source code dynamically includes FMOD which on Mac only provides

What happens to the global variables in shared library when dlclose is called on it?

一曲冷凌霜 提交于 2020-01-01 06:14:06
问题 If a shared library (or a DLL) is being used through dlopen and dlclose mechanism and if the shared library created has some global variables whose memory comes from the heap, then what will happen to those variables and the memory when dlclose is called? If in the same process, dlopen is called again, what will be the behaviour? 回答1: If dlclose reduces the reference count to zero and the library is actually unloaded, any future reloading of the library should reset all variables with static

What happens to the global variables in shared library when dlclose is called on it?

混江龙づ霸主 提交于 2020-01-01 06:13:15
问题 If a shared library (or a DLL) is being used through dlopen and dlclose mechanism and if the shared library created has some global variables whose memory comes from the heap, then what will happen to those variables and the memory when dlclose is called? If in the same process, dlopen is called again, what will be the behaviour? 回答1: If dlclose reduces the reference count to zero and the library is actually unloaded, any future reloading of the library should reset all variables with static