Sponsored Content
Top Forums Programming compile error while using dlopen Post 102137 by andryk on Thursday 16th of March 2006 12:47:47 AM
Old 03-16-2006
Quote:
Undefined first referenced
symbol in file
dlopen testjvm2.o (symbol belongs to implicit dependency /usr/lib/libdl.so.1)
dlclose testjvm2.o (symbol belongs to implicit dependency /usr/lib/libdl.so.1)
dlerror testjvm2.o (symbol belongs to implicit dependency /usr/lib/libdl.so.1)
ld: fatal: Symbol referencing errors. No output written to testjvm2
Then you must link it explicitly with dl, try
Code:
 cc -o testjvm2 testjvm2.c -ldl

 

10 More Discussions You Might Find Interesting

1. Programming

Error in compile C by gcc

Hi all, I compile my c program and get following result hrnpfc01.c:1387: stray '\' in program hrnpfc01.c:1387: parse error before `,' hrnpfc01.c:1388: stray '\' in program hrnpfc01.c:1388: parse error before `,' hrnpfc01.c:1396: stray '\' in program hrnpfc01.c:1396: parse error before... (4 Replies)
Discussion started by: zico
4 Replies

2. Programming

resolve_symbols: loader error: dlopen:

when i try to run an executable i got the following error message: resolve_symbols: loader error: dlopen: what does this error mean and what should be done to avoid this? with regards (1 Reply)
Discussion started by: gfhgfnhhn
1 Replies

3. Programming

Compile error

Dear All I have a program writen in C and test in Unix. Now, I am try to run this program in windows 2000. I am receiving an error ]_getopt is not define. I will appreciate if any one can help explain to me why this problem is hapening and to slove this problem. Thank you (9 Replies)
Discussion started by: coulio
9 Replies

4. Programming

compile error message

i was trying to compile a c program and got the error below. i need help on how to resolve this $ make -ef putput `if ; then echo getinf.awk ; else echo getora.awk;fi` EI.sql `if ; then echo esql -static ; else echo esqlo8i;fi` -O -I. -c EI`if ; then echo .ec; else echo... (4 Replies)
Discussion started by: putput
4 Replies

5. Programming

C compile error

hello can anyone help? :confused: i make a C code in FreeBSD 5.4 and it succeed to run the program requires connection to mysql server when i try to compile it under solaris i get this error message ld: fatal: file ./lib/libmysqlclient.so: wrong ELF machine type: EM_386 why? and how to... (3 Replies)
Discussion started by: kuampang
3 Replies

6. 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

7. Solaris

Samba 3.5.4 compile error

Hello! I am trying install samba 3.5.4. and following this instruction from the source package. So, there are my steps: 1 cd ../samba-3.5.4/source3 2 ./configure (without any arguments) and when i run make it returns error .................................................... Compiling... (2 Replies)
Discussion started by: zhum
2 Replies

8. UNIX for Dummies Questions & Answers

Compiling gcc to compile make to compile yaboot

I have just installed OpenBSD on a 333MHz PPC iMac G3. It has a 6GB HDD that has been partitioned as 1GB MacOS 8.5.1, 3GB MacOS X 10.3.9, 2GB OpenBSD 4.8. I now need to install a bootloader so that my computer can recognize the OpenBSD partition at startup. I have been trying to install... (0 Replies)
Discussion started by: t04st3r
0 Replies

9. Ubuntu

Kernel compile error

Hi I'm compiling a real-time kernel in linux, but after I type make bzImage things end with this: (Things going well doing CC and things).... CC arch/x86/kernel/kgdb.o CC arch/x86/kernel/vm86_32.o CC arch/x86/kernel/early_printk.o CC arch/x86/kernel/ipipe.o... (2 Replies)
Discussion started by: mdop
2 Replies

10. Slackware

Error compile NFS

Tryng to compile nfs-utils to latest packages but.. make: Entering directory `/tmp/nfs-utils-1.2.8/utils/gssd' /bin/sh ../../libtool --tag=CC --mode=link gcc -Wall -Wextra -Wstrict-prototypes -pipe -O2 -fPIC -I/usr/kerberos/include -I/usr/kerberos/include -O2 -fPIC -ltirpc -o gssd... (4 Replies)
Discussion started by: Linusolaradm1
4 Replies
dlclose(3)						     Library Functions Manual							dlclose(3)

NAME
dlclose - Close a dlopen() object SYNOPSIS
#include <dlfcn.h> int dlclose(void *handle) PARAMETERS
A pointer to a global symbol object that is returned from a call to dlopen(). DESCRIPTION
The dlclose function is used to inform the system that the object referenced by a handle returned from a previous dlopen() invocation is no longer needed by the application. The use of dlclose() reflects a statement of intent on the part of the process, but does not create any requirements on the dynamic library loader, such as removal of the code or symbols referenced by handle. Once an object has been closed using dlclose(), an application should assume that its symbols are no longer available to dlsym(). All objects loaded automatically as a result of invoking dlopen() on the refer- enced object are also closed. The dlclose function deallocates the address space for the library corresponding to handle. The results are undefined if any user function continues to call a symbol resolved in the address space of a library that has since been deallocated by dlclose. The dlclose operation will not remove an object to which references have been relocated, until or unless all such references are removed. For instance, an object that had been loaded with a dlopen() operation specifying the RTLD_GLOBAL flag might provide a target for dynamic relocations performed in the processing of other objects - in such environments, an application may assume that no relocation, once made, will be undone or remade unless the object requiring the relocation has itself been removed. RETURN VALUE
If the referenced object was successfully closed, dlclose() returns 0. If the object could not be closed or if handle does not refer to an open object, dlclose() returns a non-zero value. More detailed diagnostic information will be available through dlerror(). ERRORS
No errors are defined. NOTES
The dlopen and dlclose routines might dynamically change the resolution of certain symbols referenced by a program or its shared library dependencies. The dlopen routine might resolve symbols that were previously unresolved, and dlclose might cause resolved symbols to become unresolved or to be reresolved to a different symbol definition. A portable application will employ a handle returned from a dlopen() invocation only within a given scope bracketed by the dlopen() and dlclose() operations. The dynamic library loader is free to use reference counting or other techniques such that multiple calls to dlopen() referencing the same object may return the same object for handle. The dynamic library loader is also free to re-use a handle. For these reasons, the value of a handle must be treated as an opaque object by the application, used only in calls to dlsym() and dlclose(). RELATED INFORMATION
dlerror(3), dlopen(3), dlsym(3). delim off dlclose(3)
All times are GMT -4. The time now is 11:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy