syscalls.h
Hi,
I have written a program that uses the read() and write() system calls. I want the program to read from a wave file and write to /dev/audio. Following is the code: Quote:
1) Is there a std header file called syscalls.h 2) When I compile this program using gcc, I get the following error: Quote:
gcc wavread2.c xyz.wav -o wavread2.o Thanks, Ashlesha. |
alright sorted out the error with the no input files...
but syscalls.h doesnt exist! |
You don’t need to use the system calls directly, just use the C wrappers that come with your C library. In short, do an “#include <unistd.h>” to get the read() and write() functions (taken from manpages). You don’t need any explicit linking since they are part of the standard C library.
If you for some reason, wish to use the system calls directly (or, more correctly, with a very thin wrapper), try something like: Code:
#include <stdio.h> |
great! thank you!
|
All times are GMT -5. The time now is 06:58 AM. |