help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem using usleep


From: Tron Thomas
Subject: Problem using usleep
Date: Thu, 25 Jan 2001 10:45:33 -0800

I tried compiling the following program using "g++ -g -Wall -ansi
-pedantic -o uSleep uSleep.cpp":

#include <unistd.h>

int main(
    int nArgumentCount,
    char* pszAguments[]
)
{
    usleep(1000);

    return(0);
}

On RedHat Linx(Intel) using egcs-2.91.66, the program successfully
compiles and links but I get the following warning:
uSleep.cpp: In function `int main(int, char **)':
uSleep.cpp:8: warning: implicit declaration of function `int
usleep(...)'

On LinuxPPC (I don't remember the compiler version), I get the following
errors:
uSleep.cpp: In function `int main(int, char **)':
uSleep.cpp:8: `usleep' undeclared (first use this function)
uSleep.cpp:8: (Each undeclared identifier is reported only once
uSleep.cpp:8: for each function it appears in.)

Can anything be done to prevent these warning and errors?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]