C: Implicit declaration of function ‘read’ and ‘write’ 6


While working on an socket-based application, we received the following warnings from the compiler:

implicit declaration of function 'read'
implicit declaration of function 'write'

read and write functions are declared in unistd.h which we forgot to include in our code.

Adding the directive


#include <unistd.h>

to the source file that used read and/or write removed the warnings.

This post is also available in: Αγγλικα

Απάντηση

Αυτός ο ιστότοπος χρησιμοποιεί το Akismet για να μειώσει τα ανεπιθύμητα σχόλια. Μάθετε πώς υφίστανται επεξεργασία τα δεδομένα των σχολίων σας.