Questions tagged [shared-libraries]

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.

7905 questions
118
votes
10 answers

What is the equivalent of Linux's ldd on windows?

What is the equivalent of Linux's ldd on Windows?
WilliamKF
  • 41,123
  • 68
  • 193
  • 295
111
votes
7 answers

C/C++ with GCC: Statically add resource files to executable/library

Does anybody have an idea how to statically compile any resource file right into the executable or the shared library file using GCC? For example I'd like to add image files that never change (and if they do, I'd have to replace the file anyway) and…
Atmocreations
  • 9,923
  • 15
  • 67
  • 102
103
votes
9 answers

Compilation fails with "relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object"

I'm trying to compile this source code from the makefile in a VPS, but its not working. The VPS is a 64 Cent OS Here's the full error # make gcc -c -O3 -w -DLINUX -I../SDK/amx/ ../SDK/amx/*.c g++ -c -O3 -w -DLINUX -I../SDK/amx/ ../SDK/*.cpp g++ -c…
user1667191
  • 2,387
  • 6
  • 20
  • 25
101
votes
4 answers

How to add additional libraries to Visual Studio project?

Allergro is an open souce C++ addon library for graphics manipulation. How do I add this library to my compiler? The instructions don't work for me as I have Windows 7. I don't know if the OS matters. I have the Visual Studio Express Edition. The…
Saad Masood
  • 11,036
  • 9
  • 32
  • 40
99
votes
6 answers

How to create your own library for Android development to be used in every program you write?

I am a Delphi programmer and have written, over the years, hundreds of classes and routines which I can use in every Delphi program I write. This library is called dlib and can be used in every Delphi program by putting this folder in my library…
Edelcom
  • 5,038
  • 8
  • 44
  • 61
95
votes
7 answers

python pip specify a library directory and an include directory

I am using pip and trying to install a python module called pyodbc which has some dependencies on non-python libraries like unixodbc-dev, unixodbc-bin, unixodbc. I cannot install these dependencies system wide at the moment, as I am only playing, so…
Cricri
  • 1,524
  • 3
  • 12
  • 17
93
votes
2 answers

What is a file with extension .a?

I downloaded this: https://github.com/mongodb/mongo-c-driver And now I'm trying to use it inside my C program, but I don't know what to do with the generated .a files. What are they? I couldn't find any information, not even in the GCC manual. And…
Blub
  • 13,014
  • 18
  • 75
  • 102
93
votes
4 answers

Easy check for unresolved symbols in shared libraries?

I am writing a fairly large C++ shared-object library, and have run into a small issue that makes debugging a pain: If I define a function/method in a header file, and forget to create a stub for it (during development), since I am building as a…
David Claridge
  • 6,159
  • 2
  • 27
  • 25
93
votes
15 answers

INSTALL_FAILED_MISSING_SHARED_LIBRARY error in Android

When I am trying to run an android application which uses Google API I get the following error [2009-07-11 11:46:43 - FirstMapView] Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY [2009-07-11 11:46:43 - FirstMapView] Please check logcat…
Brijesh Patel
  • 2,901
  • 15
  • 50
  • 73
90
votes
3 answers

Difference between .a .o and .lo file

What is the difference between .a .o and .lo file in C?
Raj
  • 4,342
  • 9
  • 40
  • 45
90
votes
4 answers

How do you find what version of libstdc++ library is installed on your linux machine?

I found the following command: strings /usr/lib/libstdc++.so.6 | grep GLIBC from here. It seems to work but this is an ad-hoc/heuristic method. Is there a specific command that can be used to query the library version of C++? Or is the method I…
Trevor Boyd Smith
  • 18,164
  • 32
  • 127
  • 177
87
votes
5 answers

What exactly does `-rdynamic` do and when exactly is it needed?

What exactly does -rdynamic (or --export-dynamic at the linker level) do and how does it relate to symbol visibility as defined by the -fvisibility* flags or visibility pragmas and __attribute__s? For --export-dynamic, ld(1) mentions: ... If you…
Petr Skocik
  • 58,047
  • 6
  • 95
  • 142
86
votes
5 answers

"relocation R_X86_64_32S against " linking Error

I'm Trying to Link a static Library to a shared library , I'm Getting the Following error /usr/bin/ld: ../../../libraries/log4cplus/liblog4cplus.a(fileappender.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a…
Thiyagarajan
  • 1,271
  • 1
  • 14
  • 19
80
votes
2 answers

How to use addr2line in Android

I am stuck with my app, as I am unable to debug as it is a multithreaded one and crashes with error SIGSEGV. I get lot of information from LogCat, which gives me addresses in my native library. It would be helpful if I could convert these addresses…
NoAIUser
  • 3,966
  • 6
  • 34
  • 52
80
votes
13 answers

error while loading shared libraries: libncurses.so.5:

I've installed Android Studio and tried to run my first project in it, and I've got following error: Error Output was: /home/user/android-studio/sdk/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared…
pawel
  • 5,976
  • 15
  • 46
  • 68