shared-libraries

Unable to find reference to std library math function inside library

Hello, I've got several programs that use shared libraries. Those shared libraries in turn use various standard C libraries. ie Program A and Program B both use Shared Library S. Shared Library S uses std C math. I want to be able to statically link Shared Library S against the standard library, and then statically link Programs A ...

Separate log files for each web application and shared libraries with log4j

I have few web applications run on the Tomcat server. Each application contains its own log4j library copy inside its own war. This allows for separate, flexible logging configuration per application. I also have few shared libraries (kept in Tomcat's shared libraries directory). I would like to have shared library loggers output among...

How do I get rid of LD_LIBRARY_PATH at run-time?

I am building a C++ application that uses Intel's IPP library. This library is installed by default in /opt and requires you to set LD_LIBRARY_PATH both for compiling and for running your software (if you choose the shared library linking, which I did). I already modified my configure.ac/Makefile.am so that I do not need to set that vari...

VisualStateManager for WPF and Silverlight

When you do code like VisualStates.GoToState(this, useTransitions, VisualStates.StateNormal); I believe this code will only work for Silverlight apps. will this affect the way a WPF app works... Trying to incorportae controls that can be shared between both silverlight and WPF apps and was just wondering what were the main pitfalls...

shared library path inconsistent from one host to another

I built my qt app so that all the Qt modules it uses are contained in the same directory as the executable. It works on the machine I used to build the app and I made sure to test this by removing those shared libraries everywhere except in the current directory of the app. Doing a ldd shows that its looking for those libraries in the c...

classes and static variables in shared libraries

I am trying to write something in c++ with an architecture like: App --> Core (.so) <-- Plugins (.so's) for linux, mac and windows. The Core is implicitly linked to App and Plugins are explicitly linked with dlopen/LoadLibrary to App. The problem I have: static variables in Core are duplicated at run-time -- Plugins and App have diff...

Can Silverlight be linked with a C++ static library ?

Hi, I'm currently doing researches to start a new project. This project will be in 2 parts a light Client (probably console) and an heavy one using silverlight. The light client must be cross-platform. However, they will both use the same Core (by the way, the core will need to use the sockets). I'd like to use C++ to build the light ...

How to call a function from a shared library?

What is the easiest and safest way to call a function from a shared library / dll? I am mostly interested in doing this on linux, but it would be better if there were a platform-independent way. Could someone provide example code to show how to make the following work, where the user has compiled his own version of foo into a shared lib...

Configuring a library to be included with C++ test

Hello, I would like to utilize the UnitTest++ library in a testing file. However, I am having some difficulty getting the library to be included at compile time. So here is my current directory structure: tests/ UnitTests++/ libUnitTest++.a src/ UnitTests++.h unit/ test.cpp I have just used the UnitTest++ gettin...

AndroidManifest from Jars

Is it possible to have an AndroidManifest.xml and or resource files in a Jar file and import that into a executable Android project? My goal is to provide styles, resources, and services from a jar library that can be accessed from a main android project for my common tools. ...

How to build shared library (.so file) for chm reader in Android?

Hi. In my application, I want to use chm library. Can anyone tell me How to build shared library (.so file) for chm reader in Android? And which toolchain is used. what is the steps for building it? Thanx in advance. ...

need help with installing shared libraries on linux

Hi, I am new to linux and trying to get the Ajax Push engine server to work on Ubuntu 9.04. I installed the server from source it fails the check that it does by using its own javascript framework. The problem is that it fails to load the modules and the output that i get in the terminal when i start it is. [Module] Failed to load ...

Advice for keeping large C++ project modular?

Our team is moving into much larger projects in size, many of which use several open source projects within them. Any advice or best practices to keep libraries and dependancies relatively modular and easily upgradable when new releases for them are out? To put it another way, lets say you make a program that is a fork of an open sourc...

Program does not find so library, even though ldconfig knows about it

The path to libidl.so.7.1 is in ld.so.conf, and the library is in the cache as well: $ /sbin/ldconfig -p | grep libidl.so.7.1 libidl.so.7.1 (libc6) => /opt/itt/idl71/bin/bin.linux.x86/libidl.so.7.1 However, for some reason it is not found by ldd: $ ldd _pyIDLmodule.so | grep libidl.so.7.1 libidl.so.7.1 => not found Yet if I...

What is the Effect of Declaring 'extern "C"' in the Header to a C++ Shared Library?

Based on this question I understand the purpose of the construct in linking C libraries with C++ code. Now suppose the following: I have a '.so' shared library compiled with a C++ compiler. The header has a 'typedef stuct' and a number of function declarations. If the header includes the extern "C" declaration... #ifdef __cplusplus ext...

How do I prevent export of symbols from statically linked library?

I have created a shared library on linux x86. In creating it, I have statically linked in openssl. OpenSSL is only used internally however I see that the openssl symbols have been exported. This is causing problems for other libraries that need my library AND openssl because the wrong symbol can be loaded at runtime. Is there a way t...

How to relink existing shared library with extra object file

I have existing Linux shared object file (shared library) which has been stripped. I want to produce a new version of the library with some additional functions included. I had hoped that something like the following would work, but does not: ld -o newlib.so newfuncs.o --whole-archive existinglib.so I do not have the source to the exi...

WCF: Share Libraries with non-.NET webservice

Hi, I have exposed a Sonic ESB process as a webservice and wrote a .NET application to upload data to it by calling its methods. To this end, I have a library of complex object on the .NET side that I added in xml format to the web service definition on the Sonic ESB side. This is a necessary step in exposing the Sonic ESB process, be...

Static Class Variables in Dynamic Library and Main Program

I am working on a project that has a class 'A' that contains a static stl container class. This class is included in both my main program and a .so file. The class uses the default(implicit, not declared) constructor/destructor. The main program loads the .so file using dlopen() and in its destructor, calls dlclose(). The program cra...

Extraneous Library Linkage

I have a question which may be somewhat silly because I'm pretty sure I may know the answer already. Suppose you have static library A, and dynamic shared object library B and your program C under linux. Suppose that library A calls functions from library B and your program calls functions from library A. Now suppose that all functions ...