shared-libraries

Segfault on C++ Plugin Library with Duplicate Symbols

折月煮酒 提交于 2019-12-06 00:40:38
问题 I have a cross platform C++ application that is broken into several shared libraries and loads additional functionality from plugin shared libraries. The plugin libraries are supposed to be self contained and function by themselves, without knowledge of or dependency on the calling application. One of the plugins contains copied code from the main application, so contains symbol names that are duplicate to those in the engine. (Yes I know that's generally a no-no, but at the time the plugin

Building a native shared library as dependency in gradle

老子叫甜甜 提交于 2019-12-06 00:12:49
I have an Android Studio project which depends on a native shared library. I have created a cmake file to compile the library and I have added a soft link to the shared library inside the android project (in src/main/jniLibs/armeabi ). That way when the android project is built, the shared library is included in the package. Here is the relevant part of build.gradle : android { ... externalNativeBuild { cmake { path "../cpp/CMakeLists.txt" } } } The problem is that gradle tries to open the shared library before invoking the instructions to build it. Information:Gradle tasks [:app:assembleDebug

Loading a shared native library in Tomcat on Ubuntu

◇◆丶佛笑我妖孽 提交于 2019-12-06 00:06:35
How do I load a shared library in Tomcat6, on Ubuntu? I have created a library "awragrids" with name "libawragrids.so" and placed it in /var/lib/tomcat6/shared I have set the following environment variables in the terminal from which I call start tomcat: export PATH=$PATH:/var/lib/tomcat6/shared export JAVA_OPTS="-Djava.library.path=/var/lib/tomcat6/shared" export LD_LIBRARY_PATH=/var/lib/tomcat6/shared I then try and load the library with private static final String GRIDTOOL_LIBRARY_NAME = "awratools"; static { try { System.loadLibrary(GRIDTOOL_LIBRARY_NAME); } catch (java.lang

Xcode4 workspace sharing projects

▼魔方 西西 提交于 2019-12-06 00:05:44
I am trying to use the new Xcode4 workspace feature to migrate some Xcode3 projects that has dependencies between them. I have a project which creates a static library and then an application project which depends on the static library. So, as the guide mentioned, I created a new workspace and dragged both the projects into the workspace. However, when I build my application, it's unable to find the header files from my static library. I get "No such file or directory" error. My intention is to let Xcode auto detect the dependencies. But, not sure what I am doing wrong, I couldn't get it to

Unsdefined reference to library class members errors from caller program

我与影子孤独终老i 提交于 2019-12-05 23:07:25
Additional Questions added below, 4/11/2011 I am developing a cross-platform set of shared libraries DLLs/Sos and tester programs in C++ though I have to be able to support C. The libraries will ship as object code only, but the tester program(s) will ship with source so our customers can have example code. For this reason I am designing the libraries to be loaded at runtime, i.e. dynamic linking using dlopen()/LoadLibraryA(). I am using g++ 4.4.3-4 on Umbutu 10.04 and VC++ 2008 on Vista/64 (in 32 bit mode). Everything seems to work just fine on Windows (right now). However, when I compile on

What is the meaning of this ImportError when importing a Cython generated .so file?

烈酒焚心 提交于 2019-12-05 22:49:32
问题 I am walking through the Cython documentation and building each of the example apps. I'm a little stuck at Using C Libraries. After successfully building the .so file and attempting to import it in a python file called test.py the following error is thrown. $ python3.2 test.py Traceback (most recent call last): File "test.py", line 12, in <module> from queue import Queue ImportError: dlopen(/Users/jeremy/Development/labs/python/cython_lib_wrapper/queue.so, 2): Symbol not found: _queue_free

Android NDK: read file from assets inside of shared library

落花浮王杯 提交于 2019-12-05 21:59:29
问题 In my app I have to pass a file from assets folder to shared library . I cannot do it with use of jni right now. I'm using precompiled shared library in my project, in which I have hardcoded path to my file, but I'm getting error "No such file or directory" . So in my .apk file I have .so file in libs/armeabi-v7a folder and my file in /assets folder. I have tried to do it like this: char *cert_file = "/assets/cacert.cert"; av_strdup(cert_file); And some other paths, but it doesn't work. Is it

two static libraries with duplicate symbols in Xcode

你离开我真会死。 提交于 2019-12-05 20:57:53
I have two static libraries which seem to have duplicate symbols(TBXML.o) and won't compile. ld: duplicate symbol _OBJC_METACLASS_$_TBXML in /Users/Hoya/Desktop/SocialSync/include/SMUFLib/deviceLib/libSFCommonLibs.a(TBXML.o) and /Users/Hoya/Desktop/SocialSync/Cauly/libCaulyDevice.a(TBXML.o) for architecture armv6 Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang failed with exit code 1 The developer of both libraries don't provide the source code so there is nothing I can do to edit the code directly to fix it. Is there anything I can do to work around this without nagging

loading gdb source for a shared library

我与影子孤独终老i 提交于 2019-12-05 20:54:54
i'm using gdb 7.2 on ubuntu 10.10 while stepping with step i get to a point that looks (literally) like this: 0x00130a2c in boost::contexts::context::impl_t::impl_t(void (*)(void*), void*, unsigned int, boost::contexts::context::impl_t*, std::auto_ptr<boost::contexts::context::allocator_base>) () from /home/lurscher/third_party/boost_1_45_0/stage/lib/libboost_context.so.1.45.0 So i want now to associate the appropiate source files; which likely should be on /home/lurscher/third_party/boost_1_45_0/boost/context and /home/lurscher/third_party/boost_1_45_0/libs/context . But the truth is i'm not

C Linux: Global variable located in shared library as singleton

回眸只為那壹抹淺笑 提交于 2019-12-05 20:35:42
问题 Is it possible to use global variable located in a shared library (.so) as a singleton if the library is used by more than one process? As example the initial value is 0, process 1 increments the var then proc2 increments the val and prints it. My experiments so far showed that the both process keep copies of the variable and if 1st increments it the second will still read 0. So the behavior is not like Windows DLLs... I read in one article here that if the global variable is not static (in