shared-libraries

cmake: figuring out which libraries is a binary target linked against

余生颓废 提交于 2019-12-13 03:44:36
问题 I wand to implement in CMake a functionality that would enable the installation of a single binary/target through a make install-TARGET command. This is fairly straightforward to do with a custom target. However, when the target binary in question is linked dynamically against other libs of the project ( BUILD_SHARED_LIBS=ON ), I need to install the receptive libs as well. Is there any way to somehow query the list of libraries? I've looked at the target properties, but haven't found anything

Relocation R_X86_64_PC32 against undefined symbol can not be used when making a shared object; recompile with -fPIC

那年仲夏 提交于 2019-12-13 03:19:15
问题 I recently upgraded gSOAP from 2.8.7 to 2.8.76. I had to make a few minor code adjustments for the upgrade, but after the upgrade the code won't link on the computer it would before. I'm trying to use gSOAP to create a shared library on a computer which uses g++ 4.9.2. I've condensed the code down to create a test case that simplifies things a bit to try to identify where the failure is occurring. gSOAP generates some ebaySoapLib* files when I run: /usr/local/bin/soapcpp2 -z1 -C -w -x -n

How to include external libraries in multiple projects without making multiple copies android java

送分小仙女□ 提交于 2019-12-13 01:51:19
问题 I am using afreechart and edu.emory.mathcs.jtransforms and org.afree.chart in numerous different activities I am writing for Android. I have a tremendous amount of trouble getting each new project configured so that I can "See" the classes from the library as I write code in Eclipse IDE. See attached source for these classes See attached javadoc for these classes See the .class files for these classes when I try to run my Activity. What I do now is make a copy of the .jar, doc src and

Linking with a shared library without version

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 23:19:12
问题 A few months ago, I built a C software that used libxml2 as a shared library, on a debian. I created a .deb file for installation of the software, and Ubuntu users could make it run. Today, the latest version of Ubuntu has a greater version of libxml2. So now, the software doesn't run, it asks for a previous version of libxml2 and the only way to make it work is building the software while linking on the new version of libxml2. So my question is, is it possible to link against a shared

Attempt to call dll function from matlab causing crash

元气小坏坏 提交于 2019-12-12 22:18:25
问题 I'm trying to use a third-party external DLL (from usbmicro) within MATLAB, but it keeps crashing MATLAB. This is from the documentation indicating the syntax of the function call from within a C program: int USBm_About( char *about ); I tried this MATLAB script (yes it's very kludgy, I'm a MATLAB noob): >> loadlibrary('USBm.dll','USBmAPI.h') >> libfunctions('USBm') >> s='sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss'; >> st=strcat(s,s,s,s); >> vp = libpointer('voidPtr',

Assembly coding strdup. Malloc calling in shared library

自古美人都是妖i 提交于 2019-12-12 21:26:57
问题 I have a problem, I can't compile my strdup while calling malloc. When I don't call malloc, it compiles my shared library perfectly, so if someone could help me that would be great ! here is my code: BITS 64 DEFAULT REL global my_strdup:function extern malloc my_strdup: [...] call malloc I compile with this: $> nasm -f elf64 my_strdup.S $> gcc -shared -o libmy.so my_strdup.o /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: my_strdup.o: relocation R_X86_64_PC32

Using reference libraries (dll) stored in a different folder from the main program?

心不动则不痛 提交于 2019-12-12 21:24:12
问题 (This might be a obvious question but I wasn't sure what to ask Bing/Google) In a VS2008 (C# Winforms) project there are numerous third party libraries that are referenced. The project uses 'Copy Local = True' so that the various DLL files end up in the same folder as the compiled application. To clean things up I would like to modify the program so that the libraries are all under a subfolder. For example: C:\MyProgram\ -> main program folder C:\MyProgram\Libraries -> DLL storage folder How

What does version info in ldd -v mean?

一笑奈何 提交于 2019-12-12 20:23:51
问题 Version information: /usr/lib/lapack/liblapack.so: libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6 libgcc_s.so.1 (GCC_4.0.0) => /lib/x86_64-linux-gnu/libgcc_s.so.1 libgfortran.so.3 (GFORTRAN_1.0) => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 libgfortran.so.3 (GFORTRAN_1.4) => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 libm.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu

How to use the generated .so library in another Android Project?

拈花ヽ惹草 提交于 2019-12-12 20:15:13
问题 I’ve followed http://kn-gloryo.github.io/Build_NDK_AndroidStudio_detail/ and it works well! However, I want to use the generated .so library in a new Android application, and I simply don’t know how to do this... I’ve been struggling for days and if any step-by-step tutorial can be shared that would be helpful! This is the Android Project MyApp which I used to generate the .so files: MainActivity : Java Class : MyNDK header file: com_demo_ble_myapp_MyNDK.h Cpp file: MyLibrary And this is the

Cannot instantiate an object in Jenkins Shared Library

旧巷老猫 提交于 2019-12-12 20:14:45
问题 Currently I am working on creating a Jenkins shared library in my project and facing a problem trying to instantiate an object. Tree structure of my application - day#1 -- ./Jenkinsfile -- ./src/File1.groovy -- ./test/File1Spec.groovy -- ./vars/file1.groovy From my Jenkinsfile I can call file1.function which inturn will create a class object written in the file ./src/File1.groovy and it works perfectly, But on day#2, I add one more class(src/File2.groovy) and tried to create an object in vars