Microsoft Visual C++ Toolkit 2003: Error: Cannot find "stdio.h"
Posted on 2005-04-24
I'm working with Java's Native Interface, and I'm trying to compile a very simple C file, with cl.exe (from Microsoft Visual C++ Toolkit 2003). Here's the code:
JNIEXPORT void JNICALL
Java_HelloWorld_displayHelloWorld(JNIEnv *env, jobject obj)
I'm using this at the command line (from the directory with "HelloWorld.h", etc):
cl -I"C:\Program Files\Java\jdk1.5.0_01\include" -I"C:\Program Files\Java\jdk1.5.0_01\include\win32" -LD HelloWorldImp.c -Fehello.dll
I'm ultimately trying to create a Shared Library (called "hello.dll"), but when I run that command, I'm getting the following output:
C:\Program Files\Java\jdk1.5.0_01\include\jni.h(21) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
stdio.h exists on my HDD; I've even added the directory that it resides in to my Systems PATH variable (I'm on Windows XP by the way).
Any ideas how I can solve this?