shared-libraries

Do I need to explicitly include a common header file(in an include path folder) used in shared library?

半腔热情 提交于 2019-12-11 21:07:17
问题 I am using a shared library , say, shr.so . This has some header file, say, shr_struct.h with structures I need to use in my program , say, main_prog.c . Do I need to keep a copy of shr_struct.h in my include path so that I can declare objects of structure types in shr_struct.h in main_prog.c ? 回答1: If your main_prog.c depends on shr_struct.h , the compiler will need to know where this last file is located. Now if the library is installed in the system "standard" library path, you may not

Remove not needed resources from android library in apk

送分小仙女□ 提交于 2019-12-11 20:26:28
问题 I have a shared library that is used by multiple variance of the app. I want to be able to strip out unused library resources as per app configuration. I don't want to remove the resources permanently, so Lint does not help The resources are referenced by shared code, I just know that in certain variance, a sizeable chunk is not used The shared code which reference the resources are being used (just in certain usage variance, a sizeable chunk is not in play) so proguard also does not help I'm

Could not build shared library using toolchain arm-uclinuxeabi

一曲冷凌霜 提交于 2019-12-11 19:27:58
问题 When i build the shared library with toolchain GNU toolchain for uClinux Cortex-M3/M4 The following error occurs: /arm-2010q1/arm-uclinuxeabi/bin/ld.real: error: no memory region specified for loadable section `.dynsym' Need help please ! 回答1: Check for the GNU toolchain version properties. you can get this arm-uclinuxeabi-gcc -v in the command line. if the tool chain is builded with --disable-shared, you will not be able to create shared library. so when you build an utility you need to use

Including the *.SO library to the Java project (Linux)

五迷三道 提交于 2019-12-11 19:15:15
问题 I am not a Java developer, but I need to solve a problem: I need to include linux SO library to an existing Java project. The library is developed using CGO and works fine with C++, Python ctypes, Ruby FFI and so on. But I can not include it to Java project without of errors (java.lang.UnsatisfiedLinkError). I have read some articles like this, and the described method is that I need use javah to create a C header first, and then write a C program, and so on. But what to do, if I have already

Trying to find and install libstdc++.so.5 to run C++ with mex for MATLAB

放肆的年华 提交于 2019-12-11 18:01:26
问题 I am using the BGL libraries for MATLAB found here on fileexchange . I get this error when using a function from this library under Ubuntu 10.04 LTS (this error did not occur under Windows, where it worked normally). ??? Invalid MEX-file '/home/alex/Documents/MATLAB/MATLABsvnWorkingDir/Bloom/graphAnalysis/analysisAttempt2/functi onsDownloaded/matlab_bgl-4.0.1/matlab_bgl/private/components_mex.mexglx': libstdc++.so.5: cannot open shared object file: No such file or directory. Error in ==>

How to call dynamic library function from c++?

核能气质少年 提交于 2019-12-11 18:00:15
问题 Currently I'm creating some sort of plugin system. My program writes the code, which is then compiled (see also my other question). The resulting (compiled) library is than opened again using dlopen . This allows people to program custom functions in the program themselves. //Open the compiled library at the specified path void* handle = dlopen("COMPILEDLIBRARYPATH", RTLD_LAZY); if (handle == NULL) { std::cout << "plugin not found" << std::endl; } //Find the function pointer and cast is to

Where is the runtime directory for SO Android libs?

时光毁灭记忆、已成空白 提交于 2019-12-11 17:58:27
问题 I have an Android app that uses an external .so library to work (OpenALPR). This .so library also needs an external conf file to work properly. When I load my library and initialize it, I need to specify the path of the conf file to the library, in a native function. private native void initialize(String country, String configFile, String runtimeDir); Here is the structure of my project: Which path am I supposed to give ? I can't find out where to put my file so that my libraries can see them

Makefile compile a library in another directory when it doesn't exist or the directory has been modify

烂漫一生 提交于 2019-12-11 17:46:53
问题 Hi i have a makefile that compiles my library and then compiles the program. What i want to do is that the makefile recompile alway i modify my library's files for that i thought in this ifneq ("$(wildcard $(PATH_LIB.A)","") FILE_EXIST = 1 else FILE_EXIST = 0 endif $(MAIN_PROCESS): $(PATH_LIB.A) check_lib ...thing to do... $(PATH_LIB.a): FILE_EXIST = 0 check_lib: ifeq("$(FILE_EXIST)","0") $(MAKE) -C $(PATH_MAKEFILE_LIB.A) endif My problem es that when i compile it relinks all time "...thins

dyld: lazy symbol binding failed

独自空忆成欢 提交于 2019-12-11 17:37:45
问题 What is this error related to? Is this a lib mismatch? Happens when I try to run a binary I compiled. I can provide more details if needed. dyld: lazy symbol binding failed: Symbol not found: _COMP_zlib Referenced from: /Volumes/Work/projects/water_db_writer/libs/mysql/lib64/libssl.1.0.0.dylib Expected in: libcrypto.1.0.0.dylib dyld: Symbol not found: _COMP_zlib Referenced from: /Volumes/Work/projects/water_db_writer/libs/mysql/lib64/libssl.1.0.0.dylib Expected in: libcrypto.1.0.0.dylib CMake

Shared python libraries between multiple APIs on AWS

£可爱£侵袭症+ 提交于 2019-12-11 16:59:31
问题 I have several different python APIs (i.e python scripts) that run using AWS lambda. The standard approach is to generate a zip file including all the external libraries that are necessary for the lambda function and then upload it to AWS. Now, I have some functions that are in common between different APIs (e.g. custom utils functions such as parse text files or dates). Currently, I am simpling duplicating the file utils.py in every zip file. However, this approach is quite inefficient (I