dynamic-library

Is there a downside to using -Bsymbolic-functions?

狂风中的少年 提交于 2019-12-18 10:52:52
问题 I recently discovered the linker option "-Bsymbolic-functions" in GNU ld: -Bsymbolic When creating a shared library, bind references to global symbols to the definition within the shared library, if any. Normally, it is possible for a program linked against a shared library to override the definition within the shared library. This option is only meaningful on ELF platforms which support shared libraries. -Bsymbolic-functions When creating a shared library, bind references to global function

C++ linux: dlopen can't find .so library

人走茶凉 提交于 2019-12-17 19:06:47
问题 Reworded Question (although it's been solved already): I've been having trouble using dlopen(3) to load a shared object library on linux. The library is part of a system of libraries built by me that are all loaded at runtime by a central executable. All of this is organized into a single workspace in Code::Blocks, where each project is given its own folder within a directory called Source, which is to be shipped with the program. The build directory of the executable is two directories

Import Library benefit

℡╲_俬逩灬. 提交于 2019-12-14 03:22:45
问题 I understand pros and cons of static and dynamic linking. But what is the benefit of Import Library? 回答1: As it is stated in this answer import library (a.k.a. stub library) is useful when one wants to link executable dynamically but do not want to mess with LoadLibrary and GetProcAddress functions. 来源: https://stackoverflow.com/questions/39401403/import-library-benefit

Detection of framework usage on Mac system?

老子叫甜甜 提交于 2019-12-13 16:07:05
问题 I wanted to develop sample framework on OSX with having requirement that at any point in time the framework should be used by only single client, i am not getting how to achieve this ? is their any API's to detect weather the framework is in use? can we use some file related API for this?..i have seen a windows sample where they where detecting the dylib's usage using Following API's ?? CreateFileMappingW MapViewOfFile OpenFileMappingW Does anyone has come across such scenarios?? 回答1: You can

How to create a dynamic library for c++ on linux?

风流意气都作罢 提交于 2019-12-13 05:13:49
问题 I would like to create a dynamic library for c++ program on linux. In c++ program/system I`m using libconfig++ library, libpqxx library, some boost and c++11. My steps: 1) g++ -Wall -I/usr/local/include/ -std=c++0x -lconfig++ -Wall -lpqxx -lpq -fPIC -c ../SourceFiles/DBHandler.cpp ../SourceFiles/ParamServer.cpp ../SourceFiles/Functions.cpp 2) g++ -shared -Wl,-soname,libctest.so.1 -o libctest.so.1.0 *.o 3) ln -sf libctest.so.1.0 libctest.so.1 4) ln -sf libctest.so.1.0 libctest.so 5) compile g+

PHP Warning: PHP Startup: Unable to load dynamic library

。_饼干妹妹 提交于 2019-12-13 03:16:20
问题 I run a PHP script and get this error: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20090626/ixed.5.2.lin' - /usr/local/lib/php/extensions/no-debug-non-zts-20090626/ixed.5.2.lin: cannot open shared object file: No such file or directory in Unknown on line 0 What does that mean? 回答1: It means there is an extension=... or zend_extension=... line in one of your php configuration files (php.ini, or another close to it) that is trying to

Rust: Segfault when executing specific line of code from a dynamically loaded library

微笑、不失礼 提交于 2019-12-12 11:12:59
问题 Im writing a simple plugin-based system in Rust to gain some skills and experience using the language. My system dynamically loads libraries and executes them at runtime to initialize each plugin. Im running into an interesting segfault issue when executing code from a dynamically-loaded library. This is the code to load and run the plugin init function: (this bit works fine) pub fn register_plugins<'rp>(&'rp mut self) { let p1 = match DynamicLibrary::open(Some("librust_plugin_1.so")) { Ok

iOS Download code when app is running

好久不见. 提交于 2019-12-12 06:23:17
问题 I am aiming at downloading code (library / framework / bundle) when the app is running. This is like download specific modules based on user's ACL. I have gone through creating static library and framework which seems like we need them when code signing app. But I need the code to be downloaded when user is using the app and run that code. Pls provide some samples 来源: https://stackoverflow.com/questions/35202560/ios-download-code-when-app-is-running

Link error with my own C++ library

你离开我真会死。 提交于 2019-12-11 07:17:24
问题 This is my first time trying to make a simple library. I worked in Ubuntu 12.04 with g++ 4.6.3. Here is the problem: [[mylib.cpp]] #include<sqlite3.h> void Mylib::blahblah() {...} void Mylib::evenmoreblah() {...} ... [[mylib.h]] #include <...> class Mylib { ... }; Then I made the lib by: gcc -c -Wall -fpic mylib.cpp gcc -shared -o libmylib.so mylib.o I used the library in a single test.cpp which contains only the main(). I put libmylib.so in ./libdir, and compiled by using: g++ -g test.cpp -o

Dynamic library uses statics libraries, undefined symbols appears

♀尐吖头ヾ 提交于 2019-12-11 00:28:19
问题 I've look for a solutions to my trouble and just get some clues, but I could not find any consistent solution: I have the code of a dynamic library (libdyna.so), that uses the functions of 3 statics libraries (libone.a, libtwo.a, libthree.a) and the log4cpp library. And when I built it the first time everything looked fine, I could make the 'libdyna.so', but when y tested it with my java test program though a wrapper (the jni wrapper works fine) I got lots of undefined references. Then I put