Using the C Wrapper Generation Script
Included in the Src/wx-c-gen
directory is wx-c-gen.pl
.
This Perl script is meant to create a template to help minimalize the
amount of work involved with creating a C# wrapper.
The script parses the C++ header files located in the wxWidgets include directory,
and outputs a C wrapper, as well as a C# stub with DllImport
statements
for interacting with the C wrapper.
The generated files are not perfect, and the parsing method that the script
uses is erronous; however, the generated files do save a fair amount of time.
To use script, first edit it, and modify the $HEADER_DIR
and
$OUTPUT_DIR
variables to suite your needs. Create the output
directories as necessary, then execute the script using the following command:
> ./wx-c-gen.pl generate
After generating, the files will be placed in the output directory specified,
and are ready for template use.