From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,b514935fdcccf632 X-Google-Attributes: gid1164f8,public From: lakha001@cerritos.edu Subject: Re: C program under DEC/Alpha Date: 1998/03/23 Message-ID: <3516E446.7BE54EF0@cerritos.edu>#1/1 X-Deja-AN: 337203412 Content-Transfer-Encoding: 7bit References: <351460D6.C20A915@cerritos.edu> <351b2e02.227711812@news.axion.bt.co.uk> To: Greg Thomas Content-Type: text/plain; charset=us-ascii Organization: HoloNet National Internet Access System: 510-704-1058/modem Mime-Version: 1.0 Newsgroups: comp.sys.dec,Ivan.Reid@PSI.ch I really appreciate all you guys helping me out with this problem. Here is a little bit more info on what kind of system I am working on and such... +++++++++++++++++++++++++++++ DEC C V5.6 for OpenVMS Alpha To compile the program I'm using the following command line $ CC/DECC/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIE The help pages for CC show that the following Object Library are being compiled if the above command line is used. o Object library included in STARLET.OLB o VAXCRTL.OLB o VAXCRTLD.OLB o VAXCRTLT.OLB o VAXCCURSE.OLB The help pages for popen look like this... CC Run-time_functions popen Initiates a pipe to a process. Syntax: #include FILE *popen (const char *command, const char *type); As you can see the only header file it's requiring is stdio.h. The program itself $ type new.c #include void main() { FILE *fi; FILE *popen(); int pclose(); fi = popen("PMDF MAIL", "w"); fprintf(fi, "send\n"); fprintf(fi, "lakha001@cerritos.edu\n\n"); fprintf(fi, "This is a test\n"); fprintf(fi, "Mail sent using C program\n"); fprintf(fi, "^Z\n"); pclose(fi); } $ CC/DECC/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIE $ link new %LINK-W-NUDFSYMS, 2 undefined symbols: %LINK-I-UDFSYM, PCLOSE %LINK-I-UDFSYM, POPEN %LINK-W-USEUNDEF, undefined symbol POPEN referenced in psect $LINK$ offset %X00000040 in module NEW file INST_DISK:[STUDENT_LA.LAKHA001.MAILC]NEW.OBJ;7 %LINK-W-USEUNDEF, undefined symbol PCLOSE referenced in psect $LINK$ offset %X00000090 in module NEW file INST_DISK:[STUDENT_LA.LAKHA001.MAILC]NEW.OBJ;7 $ Greg Thomas wrote: > On 23 Mar 1998 08:43:53 GMT, reid@psi.ch (Dr Ivan D Reid, muSR > Facility) wrote in article : > ... > >a) the following conditional definitions within stdio.h > >#if _POSIX_C_SOURCE >= 2 || !defined(_ANSI_C_SOURCE) && __CRTL_VER >= 70000000 > ... > > Since I'm running under OpenVMS V6.2, the conditional definitions > >aren't executed. However, manually inserting them into the test programme > >and using the flag /prefix=all still fails to cure the linking problem. > >Could someone with more experience of modern DEC C comment further? > > Without knowing what the linker errors were, it is difficult to say. > However, there is probably a good reason for the > "__CRTL_VER >= 70000000" - perhaps the routines you are calling are > only supported with a post-7.0 DEC C RTL? > > If so, you may want to look into something called the 'Backport' > library which comes with the later versions of the compiler. AIUI, it > allows you to use post-7.0 DEC C RTL functions with pre-OpenVMS 7.0 - > though I'm not sure of the details. > > Greg