Will read a PureBasic source file (*.pb) and generate a header out of it (*.pbi).
This program also works with SpiderBasic.
Usage:
- Under "Tools" in the PureBasic IDE add a new tool called "PBHGEN".
- At Commandline select your copy of PBHGEN.exe
- At Arguments type "%FILE" (with quotes).
- At Event to trigger the tool select Sourcecode Saved.
- Ensure you include your headers in the Source using:
- IncludeFile #PB_Compiler_File + "i" ;- PBHGEN
- To use automatic header generation in modules also use:
- Module MyModule
- IncludeFile #PB_Compiler_File + "i" ;- PBHGEN
- EndModule
This does not apply when using basic types and is a limitation of PureBasic.
Download:
PureBasic V5.73 https://00laboratories.com/wp-content/u ... HGEN573.7z
Source Code:
https://github.com/00laboratories/PBHGEN
Motivation:
PureBasic is a great language but I was always annoyed about the fact I could never choose where I would locate my Procedures, if I wished to use a Procedure somewhere I would have to move it above of the Procedure that was going to call it, the Declare statement allows to tell the compiler specific Procedures are going to exist and to find them but writing them over and over, fixing arguments is not only a pain but makes your source look like a mess. That's the reason I required an automatic header generator for PureBasic. I hope you too will enjoy the new freedom thanks to this little tool!
Official Page: https://00laboratories.com/downloads/so ... -generator