fprintf, stderr undeclared

Bryce McKinlay mckinlay@redhat.com
Fri Aug 20 16:59:00 GMT 2004


Boehm, Hans wrote:

>I keep running into build errors with undefined references
>to stderr and fprintf on the trunk,  in libjava/defineclass.cc,
>line 340, and in two places in java/lang/natClassloader.cc.
>
>Am I missing something?  I don't see reference to anything
>like <stdio.h>?  Why am I the only one complaining?
>Do newer headers have transitive includes
>which are hiding this problem?
>  
>
jni.h includes stdio.h for compatability with Sun's header, and jni.h is 
picked up from defineclass.cc if JVMPI is enabled (which I guess it is 
by default):

In file included from ../../../libjava/include/jvmpi.h:18,
                 from ../../../libjava/include/jvm.h:503,
                 from ../../../libjava/include/java-interp.h:15,
                 from ../../../libjava/defineclass.cc:24:

There should certainly be a direct #include in those files - feel free 
to check in a patch under the "obvious fix" rule.

Thanks

Bryce



More information about the Java mailing list