Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!ames!aurora!labrea!decwrl!decvax!ucbvax!dlvc.daresbury.ac.UK!SYSDEV From: SYSDEV@dlvc.daresbury.ac.UK Newsgroups: comp.os.vms Subject: Shareable image library / C bug Message-ID: <8709040748.AA01233@ucbvax.Berkeley.EDU> Date: Fri, 4-Sep-87 03:48:50 EDT Article-I.D.: ucbvax.8709040748.AA01233 Posted: Fri Sep 4 03:48:50 1987 Date-Received: Sat, 5-Sep-87 16:58:43 EDT Sender: usenet@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 46 Hi there, I think I have found a bug in the VAX linker. It appears when trying to use a shareable image library to include the standard VAX C library. If the following small program (C_BUG) #include stdio main() { printf("printf\n"); fprintf(stderr, "stderr\n"); fprintf(stdout, "stdout\n"); } is linked with the library thus: or $ link c_bug,sys$input/opt sys$share:vaxcrtl/share $ link c_bug,sys$library:vaxcrtl/lib or $ define lnk$library sys$library:vaxcrtl.olb $ link c_bug all is well. However I want to be able to use the sharable image without having to specify an options each time. This always produces an image which runs, but which does not behave as expected. When linked in one of the following ways the only output is the first line, ie. "printf" appears: $ lib/create/share myimagelib sys$share:vaxcrtl.exe $ link c_bug,myimagelib/lib or $ lib/create/share myimagelib sys$share:vaxcrtl.exe $ define lnk$library disk:[dir]myimagelib.olb $ link c_bug or $ lib/include/share sys$library:imagelib sys$share:vaxcrtl.exe $ link c_bug Other C runtime I/O routines also fail, eg. freopen(...) stops working in images linked using a shareable image library to find the C library. Does anyone know if this is a known bug/restriction ? Can anyone help please, Dave Hines. Bitnet/NetNorth/Earn: hines@mail.daresbury.ac.uk Arpa : hines@mail.daresbury.ac.uk@ucl-cs.arpa