how to auto load a dynamic library


 
Thread Tools Search this Thread
Top Forums Programming how to auto load a dynamic library
# 1  
Old 05-12-2002
how to auto load a dynamic library

hi, every body. i have in trouble that how to load a dynamic library by hand.
for example, i know how to generate a dynamic library and how to link a dynamic library in makefile.
generate a dynamic library:
add -dy -G behind cc
link a dynamic library in makefile:
add -dy -Bdynamic behind cc
but how to add a dynamic library in exe file,i don't know

please help me . thank you


subrain

Last edited by Perderabo; 03-17-2005 at 11:11 AM.. Reason: Remove email
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Specifying dynamic library path to linker at compile time

I would like to compile a binary that doesnot depend on LD_LIBRARY_PATH as this binary will be setuid to owner and used by other users and since setuid doesnot support LD_LIBRARY_PATH making it independent of LD_LIBRARY_PATH would be great. But I am not able to specify the path of the shared... (1 Reply)
Discussion started by: waavman
1 Replies

2. Programming

problem in dynamic library*.so

hello I apologize if my question bothers you I work on a code developed in C + + which worked well on mac os, this code will help create libraries *.so from *.cc and *.h I used this as flags:CXXFLAGS = -g -O2 -fPIC -Wall -ldl -D_GNU_SOURCE ,CXX := g++ and $(CXX)-shared -o $(LIBNAME) $(CLIBLIB)... (0 Replies)
Discussion started by: pheapc
0 Replies

3. UNIX for Dummies Questions & Answers

Auto load and save crontab

Hi all, I am trying to simplify things for two people who will be taking over my role whilst i go on leave. In doing so, i wanted to find a way that upon login to unix, the crontab would be reloaddd and resaved. I want to do this due to our IT dept taking the server down more often of late... (5 Replies)
Discussion started by: KlintJ
5 Replies

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

5. UNIX for Dummies Questions & Answers

Problem with shared dynamic library files

I am having a major problem. Most of the commands that i am running on my centos 5 system is giving the error of type: <dynamic shared library file>:open failed: No such file or directory For example: libgcc_s.so.1: open failed: No such file or directory How can i solve this? (6 Replies)
Discussion started by: proactiveaditya
6 Replies

6. Programming

overriding the dynamic library

Hi, I wonder how can we override the dynamic library loaded by ld on start up.(dynamic linked application). so that linker uses the new library to find symbols. Is it possible to do. Cheers. (4 Replies)
Discussion started by: Raom
4 Replies

7. UNIX for Dummies Questions & Answers

Library won't load

Trying to run an X11 executable under Darwin, I keep getting: dyld: Library not loaded: /sw/lib/libglib-1.2.0.dylib Referenced from: /usr/X11R6/bin/wav2rsomac Reason: image not found Trace/BPT trap I can't figure out if this is an error in the way the program is running, or if the... (0 Replies)
Discussion started by: sansan
0 Replies

8. Programming

loading a dynamic library in linux

is there a way to load a dynamic library in linux? I know tht in AIX u can do it using the loadAndInit() function. Please guide me (2 Replies)
Discussion started by: jacques83
2 Replies

9. Linux

load dynamic and shared library in kernel

hi how can i load dynamic or shared library in linux kernel modules . mtaghiloo@yahoo.com (0 Replies)
Discussion started by: mtaghiloo
0 Replies

10. Programming

HOw to load dynamic lib from a statically linked program ?

I need to load a dynamic library from a statically linked program. Is there a way without recompiling my program. when i try to do that my program just crashes. If not possible, how can I avoid crashing the program when i try to load the dynamic lib, again without recompiling. If my... (1 Reply)
Discussion started by: disclaimer
1 Replies
Login or Register to Ask a Question
dynamic(3)						User Contributed Perl Documentation						dynamic(3)

NAME
PerlIO::via::dynamic - dynamic PerlIO layers SYNOPSIS
open $fh, $fname; $p = PerlIO::via::dynamic->new (translate => sub { $_[1] =~ s/$Filename[:ws-./\]*$/$Filename: $fname$/e}, untranslate => sub { $_[1] =~ s/$Filename[:ws-./\]*$/$Filename$/}); $p->via ($fh); binmode $fh, $p->via; # deprecated DESCRIPTION
"PerlIO::via::dynamic" is used for creating dynamic PerlIO layers. It is useful when the behavior or the layer depends on variables. You should not use this module as via layer directly (ie :via(dynamic)). Use the constructor to create new layers, with two arguments: translate and untranslate. Then use "$p-"via ($fh)> to wrap the handle. Once <$fh> is destroyed, the temporary namespace for the IO layer will be removed. Note that PerlIO::via::dynamic uses the scalar fields to reference to the object representing the dynamic namespace. OPTIONS
translate A function that translate buffer upon write. untranslate A function that translate buffer upon read. use_read Use "READ" instead of "FILL" for the layer. Useful when caller expect exact amount of data from read, and the "untranslate" function might return different length. By default "PerlIO::via::dynamic" creates line-based layer to make "translate" implementation easier. AUTHORS
Chia-liang Kao <clkao@clkao.org> COPYRIGHT
Copyright 2004 by Chia-liang Kao <clkao@clkao.org>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <http://www.perl.com/perl/misc/Artistic.html> perl v5.16.2 2008-05-31 dynamic(3)