shared-libraries

Building a shared library using gcc

SOLVED. See below for the corrections (labeled FIXED). I'm having trouble creating a shared library using gcc. I created a little sample project that closely mirrors the structure of the actual project I'm working on. I've made it available as a tar.gz archive here: http://209.59.216.197/libtest.tar.gz FIXED: I've made the fixed v...

Static library depending on shared library

I have created a communication library which is linked statically into several different applications. The library provides support for communication via different kinds of hardware. Some of the hardware is supported from the vendor via a shared library. On systems without those kinds of hardware, the shared library is not available. Pr...

constraints when dynamically loading a shared object from another shared object?

I'm dynamically loading (whith dlopen()) a shared object (named libprofile1.so) from main. In libprofile1.so I have defined factory function CreateProfile and class Profile. CreateProfile function creates an instance of Profile class and returns a pointer to it. Class Profile has a method pMethod. In main, after loading libprofile...

C++ MinGW shared libraries problem (Windows only,works on Linux)?

Greetings all, I use MinGW,QT and CMake for my project. As shown in the figure, my project has two modules. libRinzoCore.DLL - a shared library which define some abstract classes and interfaces and some core functionality of the application.This module is used to implement dynamic Plugins (which are also shared libraries which auto...

Setting dylib paths as a XCode build step.

I have a Cocoa application as XCode project that has several supplementary bits of functionality as dylib targets. When XCode builds the project, it places all the build outputs in a single folder: The .app bundle and the dylib files. And when executed from the XCode debugger, the .app launches. I can't however launch the application f...

How does python load Boost.Python libraries?

Considering the following archetypal Boost.Python module, which brings a class "D" from a separate C++ header file. /* file: a/b.cpp */ BOOST_PYTHON_MODULE(c) { class_<d>("D") } When I compile this to a shared library, I'm confused how I can expose it to Python. What should I call the library? a.so? liba.so? b.so? libb.so? Where...

In what order does ld-linux.so search shared libraries?

When ld-linux resolves a symbol it searches through the shared libraries in a particular order and stops when it finds a shared library with a matching symbol. What determines the order it searches through the libraries? Does it make a difference if the unresolved symbol is in the main program or in another shared library? How could I ...

how to link shared library against other shared library in linux ?

My application dynamically loads liba.so (with dlopen). liba.so uses libb.so so I want to link liba.so against libb.so. How to do this in Linux? Thanks in advance. ...

dynamically loading static library?

Can a static libary *.a in Linux be dynamically loaded at runtime? I've read here that ...both static and shared libraries can be used as dynamically loaded libraries. How to dynamically load static library? ...

Polymorphically catching an exception in a -fno-rtti shared library on Mac OS X

Hi, I'm building a shared library with f-no-rtti. Internally, this library throws std:invalid_argument and catches std::exception, but the catch clause is never entered. The following code reproduces the problem (g++ 4.2, Mac OS X 10.6): // library.cpp: exports f(), compiled with -fno-rtti #include <stdexcept> #include <iostream> exte...

Error while mapping shared library sections: libhmmm.so: Success.

I'm having trouble with gdb and loading debugging information from shared libraries. The error I get when running from within gdb is: >>run Error while mapping shared library sections: libhmmm.so: Success. .... .... >>break container_main Error cannot access memory at 0x9f18 The shared library in question exists and is located in the...

Other options besides svn:externals and shared repository checkouts?

I want to share my code libraries between multiple PHP projects. I am using SVN (unfortunately). What other options are there to share code besides using 1) svn:externals or 2) a shared repository checkout + paths in config files? My objections to svn:externals are: 1) Mercurial does not have this, and I prefer that; and 2) it is easy ...

What is the deal with undefined symbols in a shared library or dylib?

I have a Makefile for linux that I am porting over to Darwin. The makefile takes a bunch of .o files and links them together into a .so shared object. Okay, so I figured (am I wrong about this?) that the best analog for this in Darwin is the dylib. So I changed the -shared flag to -dynamiclib. Now the code that I am linking together ...

Linux Installing Library (ICU) Question

I'm a relative noob to installing libraries. My system currently has an older version of the ICU library (3.8) and I want to go the latest (4.4). Following the steps in the ICU readme.html, everything goes fine (echo $? produces all 0 for every step). And I see the libary was installed to /usr/local/lib. However the current version of t...

Sharing common libraries in a large team & tracking what version of the libraries are being used

I belong to a .NET shop using TFS. In the last year or so we've been trying to share and between our teams (some local, some in a completely different region). Up until now, we've included shared code as project references. As the dependency on the shared code grows, we're getting into more and more problems (people modifying code th...

Include static lib in dynamic lib

Hello all, I have the following problem : several object files a1.o, a2.o, a3.o, ... an archive libxxxx.a. The archive libxxxx.a only contains object files : b1.o, b2.o etc... I would like to create a shared library (.so) from all the object files. Problem : If I use : g++ -shared libxxxx.a a1.o a2.o ... -o libnew.so g++ does un...

qmake: How to avoid having version numbers in .so file name

Hello, I'm trying to build a dynamic library on Linux using qmake. Here is my .pro file: TEMPLATE = lib TARGET = sqxUiBase QT += core gui CONFIG += dll INCLUDEPATH += ../../public/include DEPENDPATH += . UI_DIR += ../GeneratedFiles RCC_DIR += ../GeneratedFiles CONFIG(release, debug|release) { DESTDIR = ../lib/relea...

Good Strategy for sharing project dependencies/resources across multiple projects/boxes/developers?

Hi all, I work in a small developing team with 3 developers and none of us are really 'uber elite programmers' but we get by pretty well for our company. One thing that has been constantly recurring is we keep using the same resources in multiple projects. One example being the fckeditor control, however it stinks to constantly add this...

Could not find any resources appropriate for the specified culture or the neutral culture. - Resource file sharing problem

I have a normal class library. Recently, I localized this class library. I also have another Silverlight class library, Which is basically a linked file project <Link>Reports\Reports.cs</Link> In that, I have included the same resx file as link reference as I done for other files. While running, it throws the following exception. ...

cmake: figuring out which libraries is a binary target linked against

I wand to implement in CMake a functionality that would enable the installation of a single binary/target through a make install-TARGET command. This is fairly straightforward to do with a custom target. However, when the target binary in question is linked dynamically against other libs of the project (BUILD_SHARED_LIBS=ON), I need to i...