Re: Need help with parsing stdio.h
Posted by
Xerxes Rånby on
Mar 03, 2014; 8:03pm
URL: https://forum.jogamp.org/Need-help-with-parsing-stdio-h-tp4031763p4031765.html
You need to read the section in the gluegen manual about the need to stub headers that include stdio.h
http://jogamp.org/gluegen/doc/manual/#SecStub"As much as is possible, GlueGen is intended to operate on unmodified C header files, so that it is easy to upgrade the given C API being bound to Java simply by dropping in a new set of header files. However, most C headers contain references to standard headers like stdio.h, and if this header is parsed by GlueGen, the tool will automatically attempt to generate Java entry points for such routines as fread and fwrite, among others. It is impractical to exclude these APIs on a case by case basis. Therefore, the suggested technique to avoid polluting the binding with these APIs is to "stub out" the headers. "
All the OpenGL OpenAL and OpenCL headers have removed references to stdio.h in order to allow us to only bind the GL AL and CL API without unintentionally map the whole gnu libc API.