views:

68

answers:

2

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?

+1  A: 
C:\>cl /?
...
/TC compile all files as .c
...
ephemient
A: 

From the cl -? output:

/Za disable extensions
/Tc<source file> compile file as .c
/TC compile all files as .c
John Weldon