shared-libraries

JBoss Custom lib directory

余生颓废 提交于 2019-12-08 08:55:45
问题 I have this third party framework which comes with a huge set of dependent libraries, which by the way, have not yet been indexed in any Maven repository. I want to use this framework with some Web Apps, but for obvious reasons I don't want to put all those libraries under WEB-INF/lib, neither do I want just to place them all under server/default/lib to avoid mixing them with other local and third party libraries. Is there some way under JBoss 4.2.2 or higher to specify a custom lib directory

Compiling PIC object with static library

╄→гoц情女王★ 提交于 2019-12-08 08:17:03
问题 I am generating a shared library on linux and I am using this xml parser "mini xml" to parse some xml config files for my library. The thing I want is not to have any dependency on this xml parser so I want to use the static libmxml.a library provided by the vendor instead of using libmxml.so which is also there along with libmxml.so such that my shared library does not depend on libmxml when deployed. I have tried following but it doesnt work. gcc -fPIC -o myobject.o -static -lmxml -c

Visibility of template function specialisations in shared libraries; dependence on template parameter

我只是一个虾纸丫 提交于 2019-12-08 08:00:34
I am building some C++ code that utilises pybind11 to do some wrapping and create a Python extension module, and I am encountering some undefined symbol problems. Upon further examination, it appears to be because certain template function specialisations are not publically visible in the shared library I am building. I have a MWE to demonstrate explicitly the problem: symbol_test.hpp #include <pybind11/pybind11.h> template <typename T> void test_func(T var) {} template <> void test_func<int>(int); template <> void test_func<pybind11::object>(pybind11::object); symbol_test.cpp #include "symbol

forcing linking with a different SONAME than this of library

烂漫一生 提交于 2019-12-08 07:37:57
问题 How to link a binary in a manner to be compatible with two existing version of a library that have conflicting SONAME ? Those two versions don't share same SONAME prefix. One is libcapi10.so.3 and the other is libcapi10.so.4. I can't recompile them since i get them as binary, and since those are certified crypto libraries i can't request new one with right SONAME. Of course i would not have faced any problem if one was libcap10.so.3 and the other libcap10.so.3.1 since i would just need to

Solaris linker equivalent to the GNU LD --export-dynamic flag

血红的双手。 提交于 2019-12-08 07:29:25
问题 Like the question says: We are building on Linux using the GNU linker, and on Solaris using the solaris ld . GNU ld supports the --export-dynamic flag, which: When creating a dynamically linked executable, add all symbols to the dynamic symbol table. The dynamic symbol table is the set of symbols which are visible from dynamic objects at run time. What is the equivalent to this flag using the solaris linker? Is there an equivalent? 回答1: The Sun Studio linker ( ld ), by default, exports all

Create a valid shared library in C

倖福魔咒の 提交于 2019-12-08 07:20:49
问题 I'm doing some test to learn how to create shared library. The template for shared libraries in Code::Blocks is this library.c // The functions contained in this file are pretty dummy // and are included only as a placeholder. Nevertheless, // they *will* get included in the shared library if you // don't remove them :) // // Obviously, you 'll have to write yourself the super-duper // functions to include in the resulting library... // Also, it's not necessary to write every function in this

Visibility of template function specialisations in shared libraries; dependence on template parameter

烂漫一生 提交于 2019-12-08 06:35:40
问题 I am building some C++ code that utilises pybind11 to do some wrapping and create a Python extension module, and I am encountering some undefined symbol problems. Upon further examination, it appears to be because certain template function specialisations are not publically visible in the shared library I am building. I have a MWE to demonstrate explicitly the problem: symbol_test.hpp #include <pybind11/pybind11.h> template <typename T> void test_func(T var) {} template <> void test_func<int>

Wrapping symbols during linking on OS X

元气小坏坏 提交于 2019-12-08 04:53:07
问题 I'm trying to wrap one symbol by another during link. As I understand this is easily done with ld --wrap option, but on OS X it's not available. There is '-idefinition:indirection', here how I'm trying to cheat main so it will print 42: a.cpp: int foo() { return 1; } b.cpp: int wrap_foo() { return 42; } main.cpp: #include <cstdio> int foo(); int wrap_foo(); int main() { printf("%d\n", foo()); } How I build and link them: $ gcc -c *.cpp $ gcc -Wl,-i__Z3foov:__Z8wrap_foov *.o duplicate symbol _

How to modify librtmp Makefile to remove version suffix?

随声附和 提交于 2019-12-08 04:13:55
问题 By default librtmp compile produces librtmp.so.1 file and symlink librtmp.so . I need to have librtmp.so without number suffix as andorid does not support it. I was able to modify Makefile to get librtmp.so file: #SO_VERSION=1 #SO_posix=.${SOX}.${SO_VERSION} SO_posix=${SOX} so the file produced file is now librtmp.so But android can't load it as it still tries to load librtmp.so. (with dot): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1891]: 170 could not load

Unable to find classes in Android library file

*爱你&永不变心* 提交于 2019-12-08 03:52:16
问题 I have created a very simple Android app just to work with functionality. Within the app I would like to call a web service client to retrieve and display some data. I think I have succesfully imported and referenced the jar file (i.e. library). It appears to be instantiating the class successfully but when that class is referencing another class within the jar/library it throws a class not found error. Any ideas??? Anything else I can provide to help answer??? Here is my code: package mhcs