<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>GlueGen Code Generator</title> </head> <body> <h2><i>JogAmp GlueGen</i> Code Generator</h2> <h4>GlueGen Data Type Mapping</h4> Gluegen has build-in types (terminal symbols) for:<br/> <br/> <table border="1"> <tr><th>type</th> <th>java bits</th> <th>native-x32 bits</th><th>native-x64 bits</th><th>type</th> <th>signed</th> <th>origin</th</tr> <tr><th>void</th> <th> 0</th> <th> 0</th> <th> 0</th> <th>void</th> <th>void</th> <th>ANSI-C</th></tr> <tr><th>char</th> <th> 8</th> <th> 8</th> <th> 8</th> <th>integer</th><th>signed or unsigned</th><th>ANSI-C</th></tr> <tr><th>short</th> <th>16</th> <th>16</th> <th>16</th> <th>integer</th><th>signed or unsigned</th><th>ANSI-C</th></tr> <tr><th>int</th> <th>32</th> <th>32</th> <th>32</th> <th>integer</th><th>signed or unsigned</th><th>ANSI-C</th></tr> <tr><th>long</th> <th>64</th> <th>32</th> <th>32<sup>1</sup></th> <th>integer</th><th>signed or unsigned</th><th>Windows</th></tr> <tr><th>long</th> <th>64</th> <th>32</th> <th>64</th> <th>integer</th><th>signed or unsigned</th><th>Unix</th></tr> <tr><th>float</th> <th>32</th> <th>32</th> <th>32</th> <th>float</th> <th>signed</th> <th>ANSI-C</th></tr> <tr><th>double</th> <th>64</th> <th>64</th> <th>64</th> <th>double</th> <th>signed</th> <th>ANSI-C</th></tr> <tr><th>__int32</th> <th>32</th> <th>32</th> <th>32</th> <th>integer</th><th>signed or unsigned</th><th>windows</th></tr> <tr><th>int32_t</th> <th>32</th> <th>32</th> <th>32</th> <th>integer</th><th>signed</th> <th>stdint.h</th></tr> <tr><th>wchar_t</th> <th>32</th> <th>32</th> <th>32</th> <th>integer</th><th>signed</th> <th>stddef.h</th></tr> <tr><th>uint32_t</th> <th>32</th> <th>32</th> <th>32</th> <th>integer</th><th>unsigned</th> <th>stdint.h</th></tr> <tr><th>__int64</th> <th>64</th> <th>64</th> <th>64</th> <th>integer</th><th>signed or unsigned</th><th>windows</th></tr> <tr><th>int64_t</th> <th>64</th> <th>64</th> <th>64</th> <th>integer</th><th>signed</th> <th>stdint.h</th></tr> <tr><th>uint64_t</th> <th>64</th> <th>64</th> <th>64</th> <th>integer</th><th>unsigned</th> <th>stdint.h</th></tr> <tr><th>ptrdiff_t</th> <th>64</th> <th>32</th> <th>64</th> <th>integer</th><th>signed</th> <th>stddef.h</th></tr> <tr><th>intptr_t</th> <th>64</th> <th>32</th> <th>64</th> <th>integer</th><th>signed</th> <th>stdint.h</th></tr> <tr><th>size_t</th> <th>64</th> <th>32</th> <th>64</th> <th>integer</th><th>unsigned</th> <th>stddef.h</th></tr> <tr><th>uintptr_t</th> <th>64</th> <th>32</th> <th>64</th> <th>integer</th><th>unsigned</th> <th>stdint.h</th></tr> </table> <p> <b>Warning:</b> Try to avoid unspecified bit sized types, especially <b>long</b>, since it differs on Unix and Windows!<br/> <b>Note 1:</b> Type <b>long</b> will result in broken code on Windows, since we don't differentiate the OS and it's bit size is ambiguous. </p> <p> <h4>GlueGen Platform Header Files</h4> GlueGen provides convenient platform headers,<br/> which can be included in your C header files for native compilation and GlueGen code generation.<br/> <br/> Example:<br/> <pre> #include <gluegen_stdint.h> #include <gluegen_stddef.h> uint64_t test64; size_t size1; ptrdiff_t ptr1; </pre> <br/> To compile this file you have to include the following folder to your compilers system includes, ie <code>-I</code>:<br/> <pre> gluegen/make/stub_includes/platform </pre> <br> To generate code for this file you have to include the following folder to your GlueGen <code>includeRefid</code> element:<br> <pre> gluegen/make/stub_includes/gluegen </pre> <h4>GlueGen Pre-Defined Macros</h4> To identity a GlueGen code generation run, GlueGen defines the following macros:<br/> <pre> #define __GLUEGEN__ 2 </pre> <br> <br> </body> </html>