shared-libraries

gdb can not open shared object file

北城余情 提交于 2019-12-06 03:44:00
问题 I am trying to debug my application starting from console. > gdb ./Geod then in gdb (gdb) run and I get the output: error while loading shared libraries: libGeo.Cored.so.1: cannot open shared object file: No such file or directory The system is configured as follows: > echo $LD_LIBRARY_PATH /home/paceholder/projects/geo/lib/debug > ls $LD_LIBRARY_PATH libGeo.Cored.so.1.0.0 libGeo.Cored.so libGeo.Cored.so.1 libGeo.Cored.so.1.0 (gdb) show solib-search-path The search path for loading non

Unable to load .so library files when making a system application

孤街醉人 提交于 2019-12-06 03:09:11
问题 I have created an application which will be a System Application . When I install the application normally(not as system application) ".so" files are getting loaded. But when I'm making it a system application by putting the apk into /system/app/ , I'm getting the following error 01-09 00:20:26.889: E/AndroidRuntime(2101): java.lang.UnsatisfiedLinkError: Couldn't load iconv from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip

Problem on Mac : “Can't find a register in class BREG while reloading asm”

江枫思渺然 提交于 2019-12-06 02:49:16
问题 I tried to port some code onto Mac OS X. The program uses the "ttmath" library, a header big-num header library. This library works fine on both windows and linux, but when I try to compile and run it on a Mac, the following error message always shows up : "can't find a register in class 'BREG' while reloading 'asm'". I found some documents say that this problem is due to the old version of GCC compiler (build 5488), but this message still shows up after I updated GCC. currently my GCC

How to set the dynamic linker path for a shared library?

十年热恋 提交于 2019-12-06 02:35:11
问题 I want to compile a shared library with an .interp segment. #include <stdio.h> int foo(int argc, char** argv) { printf("Hello, world!\n"); return 0; } I'm using the following commands. gcc -c -o test.o test.c ld --dynamic-linker=blah -shared -o test.so test.o I end up without an INTERP segment, as if I never passed the --dynamic-linker=blah option. Check with readelf -l test.so . When building an executable, the linker processes the option correctly and puts an INTERP segment in the program

NDK Android - Can't build ARMv5 and V7 at the same time

拜拜、爱过 提交于 2019-12-06 02:05:58
I'm facing a weird problem. I'm building a shared library for my Android application. I can't build both armv5 and armv7 at the same time. If I do so, I get a lot of errors on my source files at the second run (when the ndk build the armV7 lib) like: FinderPatternInfo.o: previous definition here multiple definition of ... My Application.mk APP_ABI := armeabi armeabi-v7a APP_PLATFORM := android-8 APP_STL := stlport_static APP_CPPFLAGS += -fexceptions It works perfectly if I only set APP_ABI := armeabi or APP_ABI := armeabi-v7a.. Any idea ? Thank you for your help, EDIT: Android.mk LOCAL_PATH :=

.so with numerals after that, how to match them in find_library in cmake ? Error in linking shared objects which are found as sub-dependencies

£可爱£侵袭症+ 提交于 2019-12-06 02:00:24
Given ls -lrt /usr/lib/libvpx* results lrwxrwxrwx 1 root root 15 Feb 9 2012 /usr/lib/libvpx.so.1.0 ->libvpx.so.1.0.0 lrwxrwxrwx 1 root root 15 Feb 9 2012 /usr/lib/libvpx.so.1 -> libvpx.so.1.0.0 -rw-r--r-- 1 root root 646120 Feb 9 2012 /usr/lib/libvpx.so.1.0.0 ls -lrt /usr/lib/libschroedinger* results lrwxrwxrwx 1 root root 29 Feb 8 2012 /usr/lib/libschroedinger-1.0.so.0 ->libschroedinger-1.0.so.0.11.0 -rw-r--r-- 1 root root 774044 Feb 8 2012 /usr/lib/libschroedinger-1.0.so.0.11.0 ls -lrt /usr/lib/libgsm* results lrwxrwxrwx 1 root root 16 Nov 5 2009 /usr/lib/libgsm.so.1 -> libgsm.so.1.0.12 -rw

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

流过昼夜 提交于 2019-12-06 01:39:34
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. There are three main approaches: Pass a structure of function pointers to the DLL from the application, giving access to whatever symbols you

what are the pros and cons of using a DLL?

北城余情 提交于 2019-12-06 01:34:11
问题 Windows still use DLLs and Mac programs seem to not use DLL at all. Are there benefits or disadvantages of using either technique? If a program installation includes all the DLL it requires so that it will work 100% well, will it be the same as statically linking all the libraries? 回答1: MacOS X, like other flavours of Unix, use shared libraries, which are just another form of DLL. And yes both are advantageous as the DLL or shared library code can be shared between multiple processes. It does

Libraries to compile libuv on os x?

匆匆过客 提交于 2019-12-06 01:12:36
I'm trying to learn some libuv and it seems there's a great book that goes through it. However, the book doesn't explain how to actually compile it. I ran make on the code that I pulled from github, and compiled with GYP as described on the github ( https://github.com/joyent/libuv ). However I'm not sure what kind of libraries I need to include to get the code to compile. I tried to compile this code: /* first.c */ #include <stdio.h> #include <uv.h> int main() { uv_loop_t *loop = uv_loop_new(); printf("Now quitting.\n"); uv_run(loop, UV_RUN_DEFAULT); return 0; } I compiled it with the

two instances of a static member, how could that be?

六眼飞鱼酱① 提交于 2019-12-06 00:44:50
问题 I have a multithreaded application. I declare a class with a static member in a shared library. Printing the address of the member from different threads from different libraries shows different results. //declaration template <class OBJECT> struct Container { static int m_member; }; template <class OBJECT> int Container<OBJECT>::m_member; // printing cout << (void*) &Container<int>::m_member << endl; How could that be? 回答1: If you have different libraries, (I'm guessing different dynamic