MinGW comple error

What does this compile error mean?

[exec] Executing 'gcc' with arguments:

[exec] '-mno-cygwin'

[exec] '-IC:\Program Files\Java\jdk1.5.0_11\include'

[exec] '-IC:\Program Files\Java\jdk1.5.0_11\include\win32'

[exec] '-Iinclude'

[exec] '-c'

[exec] 'source/jnewton_JNewtonWorld.c'

[exec] 'source/jnewton_JNewtonCollision.c'

[exec] 'source/jnewton_JNewtonBody.c'

[exec] '-o'

[exec] 'build/jnewton_JNewtonWorld.o'

[exec] 'build/jnewton_JNewtonCollision.o'

[exec] 'build/jnewton_JNewtonBody.o'

[exec]

[exec] The ' characters around the executable and arguments are

[exec] not part of the command.

[exec] In file included from C:/Program Files/Java/jdk1.5.0_11/include/jni.h:21,

[exec] from include/jnewton_JNewtonCollision.h:2,

[exec] from source/jnewton_JNewtonCollision.c:1:

[exec] I:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdio.h:219: error: redefinition of 'vsnprintf'

[exec] I:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdio.h:219: error: redefinition of 'vsnprintf'

[exec] I:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdio.h:279: error: redefinition of 'putchar'

[exec] I:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdio.h:279: error: redefinition of 'putchar'

[exec] In file included from C:/Program Files/Java/jdk1.5.0_11/include/jni.h:21,

[exec] from include/jnewton_JNewtonBody.h:2,

[exec] from source/jnewton_JNewtonBody.c:1:

[exec] I:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdio.h:219: error: redefinition of 'vsnprintf'

[exec] I:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdio.h:219: error: redefinition of 'vsnprintf'

[exec] I:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdio.h:279: error: redefinition of 'putchar'

[exec] I:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdio.h:279: error: redefinition of 'putchar'

Jim

[2076 byte] By [jjones3566a] at [2007-11-26 20:21:23]
# 1

In looking around at the C literature, I've discovered that I have a common problem which occurs in more complex projects. All of the code that I have at present compiled and worked before I split it up on the Java and C sides. I have 3 classes with native methods on the Java side from which I'm generating 3 JNI header files. Then each header file is used by one and only one C source file. As you can see in the Ant output the first source file compiles fine, but on the other two I'm accused of redefinition of some variables or functions in the stdio.h which appears to be present in the compiler libraries. The error starts in jini.h because it also #includes<stdio.h>.

I tried to remedy this by stripping includes. The generated header files I left alone. In the source files the only include is the generated header which defines the function in the source file. Still have the error.

I've looked at the stdio.h in MinGW and it is different from the one in VC7. I know that when you use #include<stdio.h> your pulling from a system path of some kind, but it worked before. Any ideas how I can test this setup or avoid the "redefinition" problem?

jjones3566a at 2007-7-10 0:46:03 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2

I am not sure that I agree with your conclusion.

The error that you posted often occurs when a method is used before it is defined. What that generally means is that your include files are in the wrong order. As I recall it is easy to do this on VC if you start guessing at include files (particularily non standard ones) and put them in your source particularly in relation to the jni.h file and what it expects in that file itself.

jschella at 2007-7-10 0:46:03 > top of Java-index,Java HotSpot Virtual Machine,Specifications...