shared-libraries

libipopt.so.1: Cannot open shared object file

拈花ヽ惹草 提交于 2019-12-06 11:00:42
问题 Upon performing the basic installation of Ipopt, I'm able to compile the example they provided in Ipopt-3.12.5/Ipopt/examples/hs071_cpp successfully using the command g++ hs_071_main.cpp hs071_nlp.cpp -I/path/to/build/include/coin -L/path/to/build/lib -lipopt -llapack -lblas -lm -ldl But when I try to run ./a.out , I get the error: error while loading shared libraries: libipopt.so.1: cannot open shared object file: No such file or directory I've defined $LD_LIBRARY_PATH in .bashrc , and I've

NoClassDefFoundError: android.support.v4.content.LocalBroadcastManager [duplicate]

佐手、 提交于 2019-12-06 10:55:44
问题 This question already has answers here : NoClassDefFoundError: android/support/v4/content/LocalBroadcastManager (7 answers) Closed 6 years ago . i read a lot of topic about this error : E/AndroidRuntime(16097): java.lang.NoClassDefFoundError: android.support.v4.content.LocalBroadcastManager i just link facebook sdk to my project, compil is ok, but with the following code i got the error here is my Java Build Path : http://i.stack.imgur.com/GzqO5.png Session.openActiveSession(this, true, new

How to resolve Undefined Symbols error?

孤者浪人 提交于 2019-12-06 10:53:08
问题 I'm getting this error Undefined symbols: ".objc_class_name_MyClass", referenced from: literal-pointer@__OBJC@__cls_refs@MyClass in infoViewController.o ld: symbol(s) not found collect2: ld returned 1 exit status When referencing the static method below: [MyClass ClickComment:self.navigationController]; MyClass is defined in a static library that I'm referencing in my app project. When I start typing "[MyClass "..., I get message hints. The app project knows MyClass exist and which methods

How do I import shared object libraries at runtime in Android?

自古美人都是妖i 提交于 2019-12-06 10:44:29
I am developing an open-source emulator project, and it has multiple, customizable native plug-ins. These plug-ins are built as native shared object libraries (.so files), and have various interfaces between native and Java through JNI. Rather than distribute the APK with every single plug-in ever created, and in order to allow folks to build their own custom plug-ins, I need a method of importing these .so files any time after the app has been installed. I've found that I can copy files to the folder /data/data/[package_name], but not to the lib/ sub-folder (because it is owned by the "system

Using libtool to load a duplicate function name from a shared library

江枫思渺然 提交于 2019-12-06 09:55:28
问题 I'm trying to create a 'debug' shared library (i.e., .so or .dll file) that calls another 'real' shared library that has the same C API as the debug library (in this case, to emulate the PKCS#11 API). However, I'm running into trouble where the link map of the debug library is colliding with that of the real library and causing the debug library to call its own functions instead of the corresponding functions in the real library. I found a solution to this problem by using the POSIX dlmopen

Using CDI in a websphere shared library

落花浮王杯 提交于 2019-12-06 09:50:50
We use a shared library defined in the websphere admin console to share classes between several applications. I was wondering if it is possible to use CDI (Context and Dependecy Injection) in these classes? If so do I just need to put the beans.xml in the jar that is in the shared library, or are there further steps? Note: I can't move away from using a shared library, as this would be too much refactoring work. No, classes included in a shared library are not considered as CDI beans. Only archives included in the application itself can be considered for CDI. 来源: https://stackoverflow.com

Sharing executable memory pages in Linux?

无人久伴 提交于 2019-12-06 09:42:23
Is it possible to share executable pages on Linux for the sake of preserving space? I know that there are shared memory APIs that can be used to share memory between different processes but I don't think that is meant to be used for that. Basically, I want to have a shared memory region where some commonly used shared libraries can be loaded into. I want to get the dynamic linker to link against the preloaded (read only) images instead of having to load all of the shared library images into every single process (which seems like a waste). Is this possible on the Linux kernel? The Darwin kernel

Python freeze.py generated bin doesn't run

半世苍凉 提交于 2019-12-06 09:21:32
I need to run a Python 2.7 script into a client critical machine, so I have permission to install nothing, and when I say nothing I mean nothing even into local dirs, so the solution I found is to pass him the script as a binary created with the batteries-included tool "freeze.py" http://wiki.python.org/moin/Freeze , and I also added required and unembedable .so libraries into the same folder (_io.so, _heapd.so, ...) and give them executable permisions. But when I try to execute the binary I get: Traceback (most recent call last): File "/usr/lib/python2.7/site.py", line 562, in <module> File "

Can I make shared library constructors execute before relocations?

倖福魔咒の 提交于 2019-12-06 09:02:17
问题 Background : I'm trying to implement a system like that described in this previous answer. In short, I have an application that links against a shared library (on Linux at present). I would like that shared library to switch between multiple implementations at runtime (for instance, based on whether the host CPU supports a certain instruction set). In its simplest case, I have three distinct shared library files: libtest.so : This is the "vanilla" version of the library that will be used as a

How to export specific symbol from executables in GNU/Linux

ε祈祈猫儿з 提交于 2019-12-06 08:45:54
While loading dynamic libraries by ::dlopen() , exporting symbols from executables can be done by -rdynamic option, but it exports all the symbols of the executable, which results in bigger binary size. Is there a way to export just specific function(s)? For example, I have testlib.cpp and main.cpp as below: testlib.cpp extern void func_export(int i); extern "C" void func_test(void) { func_export(4); } main.cpp #include <cstdio> #include <dlfcn.h> void func_export(int i) { ::fprintf(stderr, "%s: %d\n", __func__, i); } void func_not_export(int i) { ::fprintf(stderr, "%s: %d\n", __func__, i); }