(stdlib.h is more C than C++, but both can use it.)
MinGW is for compiling Windows programs for running on Windows; sysconf is POSIX (despite being in stdlib.h, a file defined by the C standard; it's a bit confusing), which Windows (and therefore MinGW) can't understand. (Linux understands POSIX, as does Mac OS X and the BSDs.)
If your goal is to count the processors, use dwNumberOfProcessors in SYSTEM_INFO. If your goal is to run POSIX programs on Windows, you want Cygwin, not MinGW.
(Better two months late than never, I guess.)