Strange, I implement nearly same solution that you confirmed working... The single difference in arguments order!
Can you try:
?Code:echo 'int main(int argc, char **argv) { initscr(); return 0; }' > ./ncurses_test.c gcc -include ncurses.h -x c -o /tmp/a.out -lncurses ./ncurses_test.c
it should fail for you.