• Gno C stderr unresolved reference label

    From Mark Wade@21:1/5 to All on Mon Mar 17 20:56:08 2025
    Hi, hoping someone could help me out. I was playing around in gno and c and found I can't
    access stderr, or stdout or stdin for that matter. Compiling doit.c "cc -o doit.c doit" and
    ./doit gives me:

    sys_nerr = 56
    SEEK_END = 2

    so that much works but uncommenting the fprintf line gives me:

    Error at 0000003A past main PC = 0000004F : Unresolved reference Label:
    stderr

    Error at 0000003D past main PC = 00000052 : Unresolved reference Label:
    stderr

    It seems it doesn't get what a FILE * is, I think. I don't know.
    Any thoughts? Do I need to reinstall? I hoping there might be an easier answer.
    I'm running system 6.0.1, gno kernel v2.0.6, gno/me init version 2.0.1

    doit.c:

    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>

    int main(int argc, char *argv[]){

    printf("sys_nerr = %i\n",sys_nerr);
    printf("SEEK_END = %i\n", SEEK_END);

    //(void)fprintf(stderr, "I want to believe\n");

    return 0;
    }


    stdio.h in /gno/lib/orcacdefs:

    extern int sys_nerr; /* largest index for sys_errlist
    */
    extern char *sys_errlist[]; /* error messages */

    /*
    * files
    */

    typedef struct {
    struct file *next; /* next file in linked
    list */
    unsigned char *_ptr, /* next location to write to
    */
    *_base, /* first byte of the
    buffer */
    *_end; /* end of the file
    buffer */
    unsigned long _size, /* size of the file buffer */
    _cnt; /* # chars that can
    be read/writen to buffer */
    int _pbk; /* put back character
    */
    unsigned int _flag, /* buffer flags */
    _file; /* GS/OS file ID */
    } FILE;


    extern FILE *stderr; /* standard I/O files */
    extern FILE *stdin;
    extern FILE *stdout;

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mark Wade@21:1/5 to Kelvin Sherlock on Mon Mar 24 13:47:00 2025
    Kelvin Sherlock wrote:

    Here's a github repo with a couple updates:

    Got it, thanks much

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mark Wade@21:1/5 to Mark Wade on Tue Mar 18 13:48:56 2025
    Mark Wade wrote:
    Hi, hoping someone could help me out.

    Well, I guess I sorted it out. My installation is not quite right it
    appears. I would delete the previous post if I could. I had the header
    files in the root lib/orcacdefs directory. I changed that so that it only contains defaults.h so that the header files in
    lang/orca/libraries/orcacdefs are used.

    I don't know why or when I screwed that up. Sorry for the wasted bandwidth.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Oliver Schmidt@21:1/5 to All on Tue Mar 18 19:39:00 2025
    Hi Mark,

    [...] I would delete the previous post if I could. [...]

    All the new media used today instead of this Usenet group make me think of
    the Roy Batty monologue at the end of Blade Runner saying in "All those
    moments will be lost in time."

    Well, I love about this Usenet group that this doesn't apply here.
    Sometimes this turns against us. But it's great!

    Oliver

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mark Wade@21:1/5 to Oliver Schmidt on Wed Mar 19 00:14:06 2025
    Oliver Schmidt wrote:

    the Roy Batty monologue at the end of Blade Runner saying in "All those moments will be lost in time."

    Hi Oliver,

    Blade Runner eh? Been a long time, looks like I have some streaming due.

    Now if I could only find the man pages for :usr:orca:bin:occ and :usr:bin:dmake,
    occ(1) and dmake(1), I could sate this gnawing feeling of missing a little thing
    that should be there. Still looking and thinking they must exist someplace, somewhere...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mark Wade@21:1/5 to Mark Wade on Wed Mar 19 14:08:53 2025
    Mark Wade wrote:

    Now if I could only find the man pages for
    :usr:orca:bin:occ and :usr:bin:dmake, occ(1) and dmake(1)

    Found occ(1) at: https://mirrors.apple2.org.za/apple2.caltech.edu/NEW.FILES/occ114.bxy

    still looking for dmake(1)...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)