Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: lakha001@cerritos.edu
To: Greg Thomas <thomasgd@omc.bt.co.uk>
Subject: Re: C program under DEC/Alpha
Date: 1998/03/23	[thread overview]
Message-ID: <3516E446.7BE54EF0@cerritos.edu> (raw)
In-Reply-To: 351b2e02.227711812@news.axion.bt.co.uk


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 <stdio.h>

             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 <stdio.h>

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 <slrn6hcbmm.g202q5.reid@PSW086.PSI.CH>:
> ...
> >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






  reply	other threads:[~1998-03-23  5:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-03-21  5:00 C program under DEC/Alpha lakha001
1998-03-22  5:00 ` Dr Ivan D Reid, muSR Facility
1998-03-22  5:00   ` lakha001
1998-03-23  5:00   ` Dr Ivan D Reid, muSR Facility
1998-03-23  5:00     ` Greg Thomas
1998-03-23  5:00       ` lakha001 [this message]
1998-03-24  5:00         ` Greg Thomas
1998-03-24  5:00 ` Hoff Hoffman
1998-03-30  5:00 ` Bob Koehler
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox