Vote count: 0
I am trying the following code:
#include <stdio.h>
#include <unistd.h>
int main() {
alarm(2);
while (1) {
printf("I am a process %d\n", getpid());
}
return 0;
}
But I am getting 1 warning:
implicit declaration of function 'alarm' [-Wimplicit-function-declaration]
and 1 error:
undefined reference to 'alarm'
I am using codeblocks on Windows.
asked 41 secs ago
C - Undefined reference to 'alarm'
Aucun commentaire:
Enregistrer un commentaire