Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Function pipe()

4 views
Skip to first unread message

chara...@gmail.com

unread,
May 22, 2008, 3:35:44 PM5/22/08
to

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
---------------------------------------------------------------------

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.

Allan R. Batteiger

unread,
May 27, 2008, 8:33:53 AM5/27/08
to
chara...@gmail.com wrote in news:41b1774f-eb96-44c3-8afb-716fe68d591d@
56g2000hsm.googlegroups.com:

> 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

chara...@gmail.com

unread,
May 28, 2008, 5:05:10 AM5/28/08
to
On 27 mai, 14:33, "Allan R. Batteiger" <a...@rtsi.com> wrote:
> charanc...@gmail.com wrote in news:41b1774f-eb96-44c3-8afb-716fe68d591d@

Thank you. Compilation work now.

0 new messages