Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dlerror(3) [mojave man page]

DLERROR(3)						   BSD Library Functions Manual 						DLERROR(3)

NAME
dlerror -- get diagnostic information SYNOPSIS
#include <dlfcn.h> const char* dlerror(void); DESCRIPTION
dlerror() returns a null-terminated character string describing the last error that occurred on this thread during a call to dlopen(), dlopen_preflight(), dlsym(), or dlclose(). If no such error has occurred, dlerror() returns a null pointer. At each call to dlerror(), the error indication is reset. Thus in the case of two calls to dlerror(), where the second call follows the first immediately, the second call will always return a null pointer. SEE ALSO
dlopen(3) dlopen_preflight(3) dlclose(3) dlsym(3) dyld(3) April 17, 2006

Check Out this Related Man Page

dlerror(3)						     Library Functions Manual							dlerror(3)

NAME
dlerror - Get diagnostic information SYNOPSIS
#include <dlfcn.h> char *dlerror(void) DESCRIPTION
The dlerror function returns a null-terminated character string (with no trailing newline) that describes the last error that occurred from dynamic linking processing for a call to dlopen(), dlclose(), or dlsym(). If no dynamic linking errors have occurred since the last invo- cation of dlerror(), dlerror() returns NULL. Thus, invoking dlerror() a second time, immediately following a prior invocation, will result in NULL being returned. RETURN VALUE
If successful, dlerror() returns a null-terminated character string. Otherwise, NULL is returned. ERRORS
No errors are defined. APPLICATION USAGE
The messages returned by dlerror() may reside in a static buffer that is overwritten on each call to dlerror(). Application code should not write to this buffer. Programs wishing to preserve an error message should make their own copies of that message. Depending on the appli- cation environment with respect to asynchronous execution events, such as signals or other asynchronous computation sharing the address space, portable applications should use a critical section to retrieve the error pointer and buffer. RELATED INFORMATION
dlclose(3), dlopen(3), dlsym(3). delim off dlerror(3)
Man Page

13 More Discussions You Might Find Interesting

1. HP-UX

test program(dlopen) fails on hp but run well on solaris

Hi, I have a c test program which test dlopen call. This program run well on solaris but fails on hp-ux. The program load jvm library successfully on solaris. On hp-ux it displays error I compile this program as $cc -o testjvm testjvm.c What am I missing? I have tried... (2 Replies)
Discussion started by: shriashishpatil
2 Replies

2. Programming

Can't dlopen() a library containing Thread Local Storage

Hi, I have a small test c program which tries to dlopen a shared library(libjvm.sl). But i get error as "Can't dlopen() a library containing Thread Local Storage" My program is as below when i run the program i get error any pointers why the error?? I am using hp-ux . The... (1 Reply)
Discussion started by: shriashishpatil
1 Replies

3. Programming

compile error while using dlopen

Hi unix lovers, I am getting error while compile a function which uses dlopen. My code is I am getting error as follows Am I missing something? I think I am missing a lot :-) I am using solaris. Thanks in advance, -Ashish (5 Replies)
Discussion started by: shriashishpatil
5 Replies

4. Programming

export-dynamic

I load some dynamic libraries from main module (with dlopen). These libraries use 1 function from main module, therefore in Makefile I must use gcc -g -Wl,--export-dynamic,-rpath,./lib -o not not.o db.o -ldl -ldb -lpcap Note option --export-dynamic that is passed to the ELF linker. The... (4 Replies)
Discussion started by: Hitori
4 Replies

5. Programming

dlopen help

//foo.c #include<stdio.h> int pen(int a) { printf("%d",a); } $cc -c foo.c $ls -shared -o libfoo.so foo.o ///////////now libfoo.so formed //i have already designed libfoo.so //main.c #include<stdio.h> #include <dlfcn.h> int main() { (2 Replies)
Discussion started by: lookforlohith
2 Replies

6. Solaris

Net-SNMP-5.4.2.1 issue on Sun Solaris

Hi, I am trying to compile the source code for Net-SNMP-5.4.2.1 using the gcc compiler-3.4.6 and 3.4.3 but I am getting the follwoing error with perl enabled: /bin/sh ../libtool --mode=link gcc -g -O2 -Usolaris2 -Dsolaris2=solaris2 -fno-strict-aliasing -pipe -Wdeclaration-after-statement... (2 Replies)
Discussion started by: tisha
2 Replies

7. Solaris

dlopen() on dolaris

Dear experts, please help #include <stdio.h> #include <dlfcn.h> #include <link.h> #include <iostream.h> #include<stdlib.h> #include<errno.h> void main() { printf("\n in the main\n"); void *handle; handle = dlopen("my.so", RTLD_LAZY); if( handle ==... (2 Replies)
Discussion started by: vin_pll
2 Replies

8. Programming

Dynamic library load with dlopen

Hi, I created two library libsum.so and libproduct.so. In the libproduct.so is defined function "product" that use function "sum" defined in libsum.so. So libproduct depends on libsum. In main function I called product function by a dlopen request. Unfortunaly, when I execute program I have an... (5 Replies)
Discussion started by: shade82
5 Replies

9. Programming

Socket memory

Hi, I am using Linux to run TCP server. Whenever i accept a TCP connection from a client, i am able to around 10MB increase in prcoess(Using pmap). How can i free this when i close the connection ? I tried close(fd), but that is not freeing up this memory chunk. Please help to... (6 Replies)
Discussion started by: kumaran_5555
6 Replies

10. Programming

Help building and using a shared object (x64)

Hello, I am not that experienced with Linux, and I am currently facing some issues. The application I'm working on uses hundreds of threads. To optimize the memory usage, I am putting all my data inside a shared object (so). The steps for this are as follows: 1. a C file (generated... (17 Replies)
Discussion started by: Maelstrom
17 Replies

11. AIX

Calling functions from main program from dlopened library function

Hello All, I am trying to call a function from the calling main program from a dlopened library function, below is the entire code, when I execute it it crashes with sigill. Can you guys help me out I guess I am missing out on the linker flag or something here. besides I am new to AIX and... (1 Reply)
Discussion started by: syedtoah
1 Replies

12. Programming

Integration of PyQt/PySide issue

There is an application (Salome) that includes interpretor Python and Qt and PyQt libs. Also there is a module for this application written on Python. Specially for this module we need to include additional version of PyQt or PySide that will be distributed with our module. It doesn’t really... (2 Replies)
Discussion started by: itkalenko
2 Replies

13. Programming

C++ glibc detected double free or corruption(!prev) using shared library

Currently I test a shared library vendor provided in linux , the following is the simple source : #include <iostream> using namespace std; extern int test1(); extern int test2(); int main() { cout << "hello world" << endl ; return 0 ; cout << "Test 1" << endl; ... (6 Replies)
Discussion started by: barfatchen
6 Replies