Shared libraries are libraries that are loaded by programs when they start. A single shared copy of each library is loaded into physical memory and may be used by multiple processes at the same time. This reduces memory use and improves system performance. This tag should never be used alone.
Questions tagged [shared-libraries]
7905 questions
3
votes
1 answer
Why can't you combine a DLL with an EXE, as if it had been statically linked?
Why isn't it possible* to "re-link" a native shared library (DLL) into an executable file, as if they had been statically linked? Is the DLL missing any required information?
*Note: Or is it actually posible? If it is, please let me know, but…

user541686
- 205,094
- 128
- 528
- 886
3
votes
1 answer
Multiple projects referencing MFC: "use mfc in a static library" vs "use mfc in a shared dll"?
Using Visual Studio 2010 C++. I have a project which uses MFC and I am statically linking to MFC. I am in the process of trying to extract the non-GUI functionality into a separate static library project. Because I want to use CStrings in my…

User
- 62,498
- 72
- 186
- 247
3
votes
1 answer
Can we create shared library or assembly like .dll in flutter package project?
I'm getting problem with flutter/dart. I created one flutter-package using dart lang, there is so many dart files. But i didn't get any option to make single lib file or assembly like dll (dll in Xamarin). I want to use that API in flutter mobile…

Rakesh Kr
- 41
- 1
- 3
3
votes
0 answers
Remove shared library dependency
I am working on an open-source software package that I would like to distribute as a binary. It requires a shared library that is built using:
aclocal
automake --add-missing
autoconf
./configure
make install
Which gives these…

Throckmorton
- 564
- 4
- 17
3
votes
0 answers
C++ NetBeans Linking External Sources and .so Files
I am writing a C++ program in Linux with NetBeans. I am having difficulty setting it up to use external sources/shared objects. I have the .so files from the compiled external package and the source files that go with it.
So far I have:
specified…

KLing
- 195
- 1
- 10
3
votes
2 answers
Linking 3rd party shared libraries without soname, linker name
Installing liboost-dev on Debian Squeeze gives me several libraries like /usr/lib/libboost_thread.so.1.42.0, but no libboost_thread.so. Now I can't link using the -l flag of gcc / ld because the names don't end in .so.
I notice that /usr/lib has…

fizzer
- 13,551
- 9
- 39
- 61
3
votes
1 answer
Linker error: "relocation R_X86_64_PC32 against symbol `xmlFree' ... recompile with -fPIC" but offending library was already compiled with -fPIC
I am trying to build a shared library. My aim is to pull all dependencies as static libraries into a single shared library. My understanding is that this can be done with the -Wl,--whole-archiveflag. Here is a snippet of my CMake script responsible…

CiaranWelsh
- 7,014
- 10
- 53
- 106
3
votes
2 answers
How to use copy_from_user?
ssize_t probchar_write(struct file *filp,
const char __user *data, size_t s, loff_t *off) {
printk(KERN_DEBUG "Data> |%s|\n", data); // only for debug
char chars[MAX_LENGHT];
if(s > MAX_LENGHT)
s = MAX_LENGHT;
if…

caeycae
- 1,137
- 3
- 12
- 28
3
votes
1 answer
using std::thread in shared library causes SIGSEGV
I just came to Linux c++ programming from Windows. Trying to make a shared library libso.so, which uses std::thread. The shared library will be loaded by other people and call the export function. The test code:
// so.cpp, the .so library
#include…

aj3423
- 2,003
- 3
- 32
- 70
3
votes
1 answer
cmake to bazel - cppyy - shared libraries and includepath
I wanted to use the macro cppyy_add_bindings from FindCppyy.cmake. I have to add this in a cpp/python using bazel project. How do I handle the library dependencies? Do I have to load all libraries explicitly in the py file, or is it possible to have…

user9092688
- 171
- 10
3
votes
1 answer
Linux: Can't find existing shared library in docker container
I try to set up FastRTPS inside a docker container. I wrote a Dockerfile which builds FastRTPS and it's dependencies from source and installs the libraries and delivered examples. But the examples do not work:
/opt#…

Alex44
- 3,597
- 7
- 39
- 56
3
votes
2 answers
How to use Tesseract OCR with Cmake on Windows?
I'm tryint to use tesseract in my cmake project on Windows. I installed tesseract 5.0 and tesseract 4.0. They both come with no cmake folder so the line
find_package(Tesseract REQUIRED)
produces
CMake Error at CMakeLists.txt:14 (find_package):
By…

Guerlando OCs
- 1,886
- 9
- 61
- 150
3
votes
1 answer
C++: Linking an external library to a dll library
I'm currently developing a shared library on Windows (dll) with c++.
The library depends on another external library.
What is the best way to link them together?
Link the external library as a static library into my shared lib?
Link it as a shared…

Kevin
- 785
- 2
- 10
- 32
3
votes
0 answers
Reuse library included in bootloader in user code
I'm currently writing a custom Ethernet bootloader for a STM32F103C8T6 with a WizNet W5500 Ethernet controller. I want to keep the bootloader code as separate as possible from user code.
The problem is that the WizNet library occupies about 25% of…

LeoDJ
- 31
- 4
3
votes
3 answers
Can't load .so file stored in a library (aar) from an application project
0. Problem
I've create an Android library (aar) which contains some so files.
After successfully loaded the aar file in my Android application project, I try to load the so files (from the aar classes) but failed with a…

piratefache
- 1,308
- 11
- 17