I'm trying to compile a C file that contains jni.h. The C code is a wrapper for my Java call to a C 开发者_开发技巧method.
The code example that I'm trying to compile on my machine received compile errors for jstring and jclass. I believe it is due to Visual Studio cl command compile using the cplusplus option and I cannot get it to reference the correct definition.
I can see in the jni.h file the difference between the variable definitions.
Is there anyway to force the standard c compile using the cl command options?
C:\>cl /? ... /TC compile all files as .c ...
From the cl -?
output:
/Za disable extensions
/Tc<source file> compile file as .c
/TC compile all files as .c
精彩评论