Re: Shared Libraries on HP-UX (-shared)
Posted in 1998
In article <6dhdbd$ei9$1@nnrp1.dejanews.com>, malc_p@hotmail.com writes >This one's a cracker. > >We currently use 'c4gl -shared' when linking our compiled 4gl .o files, >finding that the executable size is at least 100k smaller, often more. This is >because '-shared' forces the runtime program to get the informix I/O, maths >etc. from a shared memory pool rather than it being compiled in with each >progam. So far, so pretty damn cool. > >As 95% of the programs here use the same base set of in-house function >libraries which are linked in as '.a' files in the final 'make'(totalling over >2Mb per program), we just wondered if we could also make >them< shared and HOW >DO WE DO IT ON HP-UX 10.20? >It's caused plenty of hair tearing round here ..... > Try doing a man on ld , that usually says how to do it. Usually something like ld -G -o myfile.so myfile.a [ this is platofmr specific, gcc uses -shared and AIX uses some horrible thing involve export/import maps and hex load addresses.. Urrgh!] Then you can do c4gl -o prog.4ge prog.4gl myfile.so Don't forget to set the environment variable SHLIB to point to the directory containing myfile.so. >FYI we are using ONLINE 7.23, 4GL 6.05. > >Malc (DBA, teaboy, scapegoat par excellence). > >-----== Posted via Deja News, The Leader in Internet Discussion ==----- >http://www.dejanews.com/ Now offering spam-free web-based newsreading -- 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