I am using popen()
in a C++ program. I see that they are C functions defined in stdio.h
. I am trying to get my IDE (KDevelop 4) to recognize popen()
.
I looked into the actual source code stdio.c
. In here, popen
does not appear "wrapped" by any macros or anything - it appears like any other typical function of stdio.h
Why, then, is popen()
not recognized by my IDE? #include <stdio.h>
should be all that is needed, but it doesn't work...
I noticed in the MAN pages they talk about Feature Test Macros. In stdio.h
, popen()
is NOT wrapped by any macro (again, it appears like any other function). Additonally, when I do try including one of these macros, e.g. #define _POSIX_C_SOURCE 2
, the problem is not resolved - popen()
still goes unrecognized.
The program compiles (g++) and runs correctly though. I would just like to know what's going on here.
(Another thread on StackOverflow addresses this question but does not obtain a satisfactory answer: popen implicitly declared even though #include <stdio.h> is added)