shared-libraries

Deploy a Qt C++ shared library's dll in subfolder of the main executable

限于喜欢 提交于 2019-12-10 23:58:59
问题 I have a Qt5 C++ project with a main app and a (created by me) shared library. It compiles and executes and I am able to deploy it. The issue is, that by deployment I need to put the compiled dll of my shared library in the same directory as the main executable. However, I preffer to keep the top level folder relatively clean and put the necessary files in an appropriate sub-tree of folders. So, my question is, what should I put in the *.pro file in order to change the path of the dll to

relinking applications that use updated shared library with implicit linking?

不羁的心 提交于 2019-12-10 23:33:52
问题 Let's say I changed a shared library and recompiled it. Do I have to relink all main applications that use that shared lib (in case I'm using that shared library with implicit linking - #include "myLib.h" ) or relinking is done automatically when those applications load? 回答1: You have to recompile only if the Application Binary Interface (ABI) of the library is incompatible with previous version - it could happen if some public functions are removed or their signature is changed, if some

Why some programs require both .lib and .dll to work…

半世苍凉 提交于 2019-12-10 23:30:05
问题 When I was going to set up my developing environment for (SDLSimple DirectMediaLayer) , I downloaded the package provided by the website, from the readme.txt file I found that I need both .lib and .dll ... My question is : I am not sure if my understanding is correct : in my thought, .lib for windows is like .a for linux , is static library , and .dll for windows is like .so for linux , is shared library , is this correct ? If the idea above is correct, I think we can only use .lib or .dll ,

Programatically determine shared libraries in use by running application

最后都变了- 提交于 2019-12-10 23:22:56
问题 Is it possible to (and, if so, how does one) determine the shared libraries of an application that are used by an application at runtime ? Basically, can I programmatically obtain the the output of ldd ? Preferred C/C++ solution does not just jump to execute ldd on the command-line. Consider the following: I have a driver application that calls doAction() from a shared library libfoo . I compile the application once and then set LD_LIBRARY_PATH to an appropriate directory containing a libfoo

Using a dll file in matlab code

☆樱花仙子☆ 提交于 2019-12-10 21:10:06
问题 I need to use a function in Matlab that is defined by a dll file. I got an example that guy converted a dll to mexw32 file but i have known how I do this. I tried use loadlibrary but it didn't create any file. How I can do this? 回答1: loadlibrary is MATLAB's implementation of FFI services, a mechanism of calling functions in external shared libraries. It involves converting between C-types and their equivalent MATLAB data types to pass data around. MEX-files are also a kind of dynamically

What does “/usr/lib/libstdc .so.6: version `GLIBCXX_3.4.15' not found” mean, and how do I fix it?

ⅰ亾dé卋堺 提交于 2019-12-10 19:13:55
问题 I'm new to compiling libraries .so under Ubuntu. I have the source, .cpp file. I installed the build-essentials package finely, and I'm using the Anjuta IDE to compile the source code. I have the Makefile and everything is good. Now although it compiles without error, when I load it, I get the error: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not found` What does this mean and how can I fix it? Edit: Any more tips? Edit2: I really need help guys. 回答1: I had similar issues and I tried

error while loading shared libraries

拈花ヽ惹草 提交于 2019-12-10 18:51:38
问题 Thank you guys answering my previous problem on undefined reference to function. As you suggested, the reason under the problem is not linking the libraries. Now I have generated the executable file with: (the version of my g++ and gcc is 4.4.5. I am using Ubuntu 10.10.) g++ -o ex_addinst ./ex_addinst.o -L/home/li/work/tools/lindo/lindoapi/bin/linux64 -m64 -llindo64 -lmosek64 -lconsub3 -lc -ldl -lm -lguide -lpthread -lsvml -limf -lirc But there comes another problem , when I run the

Building .so with recursive function in it

≯℡__Kan透↙ 提交于 2019-12-10 18:51:05
问题 During working on some project, I faced the issue that I can't build so library. I have got the error like: relocation R_X86_64_PC32 against symbol '' can not be used when making a shared object; recompile with -fPIC Eventually I managed to find the root cause. And it was recursive function in the library. For example, I have the following well know example: .section .text .globl factorial .type factorial,STT_FUNC factorial: push %rbp mov %rsp,%rbp mov 16(%rbp),%rax cmp $1,%rax je end

Shared JNI library (.so) in Tomcat - UnsatisfiedLinkError

孤街浪徒 提交于 2019-12-10 18:49:40
问题 I have a JNI library (.so) shared between two web applications deployed in Tomcat7. I am loading the library using the System.loadLibrary only once in the first web application that is being deployed and then in the second I'm checking if it already was loaded to not load anymore (I tried loading it in both and I got UnsatisfiedLinkError - library was loaded by another classloader). I can make any call to the native library in the first application, but in the second one I get

dyld_insert_libraries ignored when calling application through bash

梦想的初衷 提交于 2019-12-10 18:29:11
问题 For my application, I am using DYLD_INSERT_LIBRARIES to switch libraries. I am running Mac OS X, El Capitan. If I set these environment variables in my shell: export PYTHONHOME=${HOME}/anaconda export DYLD_INSERT_LIBRARIES=${HOME}/anaconda/lib/libpython2.7.dylib:${HOME}/anaconda/lib/libmkl_rt.dylib If I launch my application directly, it works properly. However, if I call it through a bash script I have written, the DYLD_INSERT_LIBRARIES is ignored. If I add the same 2 lines to my bash script