Re: shared libraries
Posted in 1998
In article <34B9CEA9.5C2E@nspuh.cz>, Michal Hajek <hajek@nspuh.cz> writes >Hi, > >HP-UX 9.04 (10.20 in a few weeks), OnLine 5. I'm assuming C4GL rather than RDS here. > >Can informix use shared libraries, saved in a saparate file, out >of programs, which use common functions ? I'd like to decrease >size of programs (2 - 15 MB each, and a lot of common functions. >When 130 users works at the same time ...wasted memory, seems to me.) > >1) two or more instances of the same program and only one copy of >shared functions in memory > That's what UNIX does anyway. >2) two or more instances of different programs, but using common >(same) functions and only one copy of the functions in memory > That's what shared libraries are for. Do a man ld for ow to convert a normal .a library to a .so shared library. Something like ld -G -o mylib.so mylib.a or ld -shared -o mylib.so mylib.a usually works (don't ask what SCO or AIX need!) Then do c4gl -o mine.4ge....mylib.so You may need to set an enviroment variable to point to the directory where the shared library is stored. (LD_LIBRARY_PATH or SHLIB) the exact name varies from UNIX to UNIX. Also run c4gl and check if c4gl supports the -shared option. >Is any of the points possible ? > >Thanks, Michal > > > -- David Williams Maintainer of the Informix FAQ Primary site (Beta Version) http://www.smooth1.demon.co.uk Official site http://www.iiug.org/techinfo/faq/faq_top.html I see you standin', Standin' on your own, It's such a lonely place for you, For you to be If you need a shoulder, Or if you need a friend, I'll be here standing, Until the bitter end... So don't chastise me Or think I, I mean you harm... All I ever wanted Was for you To know that I care