shared-libraries

Why can't Python find shared objects that are in directories in sys.path?

I'm trying to import pycurl: $ python -c "import pycurl" Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: libcurl.so.4: cannot open shared object file: No such file or directory Now, libcurl.so.4 is in /usr/local/lib. As you can see, this is in sys.path: $ python -c "import sys; print sys.path" [''...

Undefined symbol error for base class in C++ shared library

I compiled the following code as a shared library using g++ -shared ...: class Foo { public: Foo() {} virtual ~Foo() = 0; virtual int Bar() = 0; }; class TestFoo : public Foo { public: int Bar() { return 0; } }; extern "C" { Foo* foo; void init() { // Runtime error: undefined symbol: _ZN3FooD2Ev foo = new TestFoo()...

Transfer a boost::ptr_list from a library to a client

I dynamically load a library in C++ like described here. My abstract base class looks like this: #include <boost/ptr_container/ptr_list.hpp> class Base { public: virtual void get_list(boost::ptr_list<AnotherObject>& list) const = 0; }; And my library now provides a derived class Derived class Derived : public Base { ... }; void...

Adding generic logging support in C++ shared library

I'm writing a c++ shared library that is intended to be used by other library or executable. What is the best way to add a generic logging in my library? Ideally I'd like to adapt my library to logging functionality chosen by the library's user. Suppose i have a class in my library class A { public: void method(string param1, in...

ASP.NET deployment - How to share BIN across multiple WebApp Projects?

What is the best practice for sharing the assemblies of a bin folder across multiple ASP.net websites in IIS 7? I've got several sites, each with slightly different HTML front ends, but all with the same middle tier logic and DB. I don't want to redploy the same dlls to each of the many site's bin folders everytime I make a change. Th...

What, if any, are the implications of compiling objects with gcc -fPIC flag if they get used in executables?

I am putting together a makefile for a project i am working on. I have an executable and a shared library in the project. Both use some of the same source files which get compiled separately into object files. To be able to use these objects in the shared library I need to use the -fPIC (position independent code) flag in gcc. Are there ...

Regarding remote debugging on MCF5485EVB board using Eclipse CDT

Hello, I have installed Eclipse CDT, CodeSourcery G++ toolchain on Linux host. I am using the Code Sourcery Eclipse IDE. I have installed Linux kernel using Linux Target Image Builder from the Freescale site, onto the MCF5485 board. I have created a "helloworld" project on my Linux host using the Sourcery Eclipse IDE. I have copied the ...

netbeans 6.7 deploy J2EE Shared libraries

How can i deploy J2EE Shared libraries in Weblogic server from NetBeans 6.7 IDE. What I mean by Shared libraries is available in the following URL http://download.oracle.com/docs/cd/E13222_01/wls/docs92/ConsoleHelp/pagehelp/J2EElibraryoverviewtitle.html ...

Shared libraries and .h files

I have some doubt about how do programs use shared library. When I build a shared library ( with -shared -fPIC switches) I make some functions available from an external program. Usually I do a dlopen() to load the library and then dlsym() to link the said functions to some function pointers. This approach does not involve including any...

change current process environment

Is it possible to change current process environment variable? More specifically in a python script I want to change LD_LIBRARY_PATH so that on import of a module 'x' which depends on some xyz.so, xyz.so is taken from my given path in LD_LIBRARY_PATH is there any other way to dynamically change path from where library is loaded? Edi...

Shared libraries memory space

Does a c++ shared library have its own memory space? or does it share the caller process' one? I have a shared library which contains some classes and wrapper functions. one of this wrapper function is kinda: libXXX_construct() which initializes an object and returns the pointer to the said object. Once I use libXXX_construct() in a c...

LD_PRELOAD equivalent for Windows ?

The title says it all... Cheers David ...

Segmentation fault using shared library

I have a shared library (namely libXXX.so) with a cpp/h file associated. They contains a number of function pointers ( to point to .so function entrypoint) and a class to wrap this functions as methods of the said class. ie: .h file: typedef void* handle; /* wrapper functions */ handle okUsbFrontPanel_Construct(); void okUsbFrontPanel_...

Multiple Symbol Reference problem in shared library of a factory design pattern

Hello, I am trying to write a C++ implementation of factory design pattern. I would also like to do it using shared objects and dynamic loading. I am implementing a function called new_animal() which is passed a string. If the string is "dog", then it needs to see if a class dog is registered in shared object and create a dog object...

Behaviour of static variables in dynamically linked libraries (C/C++)

As discussed here, a static variable is stored in the .BSS or .DATA segment. Where is this memory stored if the static variable is inside a function that's in a dynamically linked library ? Does storage for this variable get allocated in the .BSS or .DATA segment of the linking process at the time of linkage ? ...

SharePoint > Custom Page-Library & PageLayout

I have a custom page-library which a custom content-type and a page-layout all inside a site-definition. Works as expected. The only thing I cannot get around is that if I upgrade the solution with the page-lib, ctype, page-layout via stsadm everything is updated except the page-layout. New fields in the ctype --> no problem Changed v...

Errors linking libresolv when building PHP 5.2.10 from source on OS X

To begin with, I would normally opt to use a pre-compiled binary of PHP, but am required to build from source for a specific business need. (I'm not the type that compiles open-source apps just for kicks.) I'm building on OS X 10.6 and am running into the following error when I try to make PHP 5.2.10 as an Apache module (--with-apxs2): ...

Relation between object file and shared object file

what is the relation b/w shared object(.so) file and object(.o) file can you please explain via example Thanks in advance ...

How to replace a dynamic library loaded in a Java Applet without requiring a full browser restart?

Hi, I'm writing a self-updating application. The first time it runs, it installs a native library on the client's computer, so that they don't need to download it every time. When it detects that the installed library's version is older than the new required minimum, it downloads and installs the new one. The problem is, the new librar...

C++ Cross Platform Dynamic Libraries; Linux and Windows

Hey guys I needed some help on writing cross-platform code but not an application but a library. I am creating a library both static and dynamic with most of the development done in Linux, I have got the static and shared library generated in Linux but now wanted to generate a windows version of a static and dynamic library in the form ...