FAQ Database Discussion Community


How to compile ELF binary so that it can be loaded as dynamic library? [duplicate]

c,linux,elf,dlopen,dynamic-library
This question already has an answer here: building a .so that is also an executable 3 answers This is theoretical question. I am aware that perhaps best practice would be the use of shared libraries. But I ran into this question and cannot seem to find an answer anywhere....

dynamic loading across multiple namespaces

c++,dlopen,dlsym
I am totally new to dlsym and I just reviewed C++ dlopen mini HOWTO .So please correct me if I am getting the concept and approaches wrong: I am planning to write an application that takes shared library names as argument: ./my_app libXYZ.so Different input libraries use their own namespaces...

undefined reference to `dlopen' 'dlsym' dlcose'

c++,ubuntu,makefile,configure,dlopen
I am using UBUNTU 12.04 and trying to install multicube explorer for Design Space Exploration. I am new with these makefile and linux internals. I follow these steps for installation ./configure make and then I get error message. Following is the log (command line reformatted for readability). [email protected]:/home/snu/Desktop/m3explorer# make g++...

Why does my .so have undefined symbols

c,dll,linker,shared-libraries,dlopen
Im creating a runtime loaded shared object in linux that impliments some JSON using jannson.h. This is how I'm building the .so: gcc -Wall -fPIC -c device_simulator_json.c gcc -shared -Wl,-soname,device_simulator_json.so.1 -o device_simulator_json.so.1.0 device_simulator_json.o When my application tries to load the .so, I get an error indication: undefined symbol: json_object I'm...

Mixing C/C++ code yields “undefined symbol” with shared library

c++,c,qt,shared-libraries,dlopen
This problem has perplexed me for a week now so I thought it might finally be time to ask you guys for help. Here is the story in a nutshell: We are developing an embedded server in-house using Qt/C++. It is a very simple server that processes client requests and...

dlclose does not close library open file handles

c,dlopen
I am dynamically loading a library with dlopen, then closing it with dlclose. I expected all library resources to be freed once dlclose completed, but there are still open file descriptors from the library after the dlclose call. I am wondering how to make sure a library is unloaded in...