Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22256

WIFCONTINUED not recognised

$
0
0

I'm writing a C program and GCC doesn't recognise WIFCONTINUED. I've included the library that contains it (sys/wait.h) and checked that the library does exist on my machine.My program:

#include <stdio.h>#include <linux/limits.h>#include <sys/wait.h>#include <sys/types.h>#include <fcntl.h>#include <unistd.h>#include <signal.h>#include <stdlib.h>#include <string.h>#include "LineParser.h"//Some code...if(WIFCONTINUED(status)){      temp->status = RUNNING;}//More code...

The error I get when I compile is:

warning: implicit declaration of function ‘WIFCONTINUED’; did you mean ‘__W_CONTINUED’? [-Wimplicit-function-declaration]                 else if(WIFCONTINUED(status)){                         ^~~~~~~~~~~~                         __W_CONTINUEDundefined reference to `WIFCONTINUED'collect2: error: ld returned 1 exit status

Has anyone experienced a similar problem with WIFCONTINUED?

EDIT:Here is some example(not my original program) that failes to compile with the same errros:

#include <stdio.h>#include <linux/limits.h>#include <sys/wait.h>#include <sys/types.h>#include <fcntl.h>#include <unistd.h>#include <signal.h>#include <stdlib.h>#include <string.h>int main(int argc,char** argv){        int status;        if(WIFCONTINUED(status)){                 printf("Works");         }        return 0;   }

My OS is Ubuntu 18.04 and my makefile is:

all: reprep: rep.o         gcc -g -Wall -m32 rep.o -o reprep.o: rep.c         gcc -g -Wall -m32 -ansi -c -o rep.o rep.c.PHONY : clean clean :      -rm -f *.o

Viewing all articles
Browse latest Browse all 22256

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>