Message error:
---------------------------------------------------------------------
l68.exe: error - symbol 'pipe'
unresolved, referenced by 'main.c'.
l68.exe: **** fatal - errors encountered
---------------------------------------------------------------------
OS-9 Product Help:
---------------------------------------------------------------------
pipe()
Create an Interprocess Communication Channel
Syntax
#include <UNIX/os9def.h>
int pipe(unsigned int fd[2]);
Description
pipe() creates an I/O mechanism called a pipe and returns 2 path
numbers, fd[0] and fd[1]. Both paths are open for read and write
access. When the pipe is written, up to 4 KB of data are buffered
before
the writing process is blocked. Data read from one of the paths
accesses data written to either of the paths on a FIFO (first-in-first-
out)
basis.
The standard programming model is that after the pipe has been set up,
two (or more) cooperating processes (created by subsequent
_os_exec calls) passes data through the pipe using read and write
I/O calls.
If an error occurs, the pipe() returns -1 and sets the global variable
errno to indicate the error.
Attributes
Operating System: OS-9 and OS-9 for 68K
State: User and System
Threads: Safe
Re-entrant: Yes
Library
unix.l
See Also
pclose()
popen()
---------------------------------------------------------------------
I've include correctly #include <UNIX/os9def.h>
Source code:
#include <process.h>
#include <errno.h>
#include <types.h>
#include <signal.h>
#include <modes.h>
#include <UNIX/os9def.h>
#include <stdio.h>
unsigned int pipe1[2];
int error;
error= pipe(pipe1);
if(error < 0)
{
printf( "\nProcessus: Pipe1 error %d -> %s \n\n",
errno,
strerror(errno));
exit(-1);
}
Can you help me please why I've this error or if I've other solution?
Thank you.
> I've problem when I would build my project with Hawk v1.2.
>
> Message error:
> ---------------------------------------------------------------------
> l68.exe: error - symbol 'pipe'
> unresolved, referenced by 'main.c'.
> l68.exe: **** fatal - errors encountered
>
> Library
> unix.l
As indicated in the documentation you must include unix.l in the link step
using Hawk. Got to the link tab under properties and in the box type
unix.l, then re-link.
Allan R. Batteiger
Thank you. Compilation work now.