multiCodeGen
Console C/C++ code generator for libraries: AdvancedMenu, SimpleGetstr
- Active · last change 5-29-2026
README
____ _ ______ __ ______
____ ___ __ __/ / /_(_) ____/___ ____/ /__ / ____/__ ____
/ __ `__ \/ / / / / __/ / / / __ \/ __ / _ \/ / __/ _ \/ __ \
/ / / / / / /_/ / / /_/ / /___/ /_/ / /_/ / __/ /_/ / __/ / / /
/_/ /_/ /_/\__,_/_/\__/_/\____/\____/\__,_/\___/\____/\___/_/ /_/multiCodeGen — console C/C++ code generator for:
- AdvancedMenu v1.0 library;
- SimpleGetstr v1.0 library.
Installation
multiCodeGen doesn't need installation. It can run from any directory.
Get latest release here.
How it works
The idea of using multiCodeGen is as follows:
- ✒️ Write special configuration file for selected library.
- 🛠️ Feed that file to multiCodeGen and get a C header file.
- 📜 Include generated header file in your C/C++ software project.
- 🔓 Now you have access to data specified in configuration file.
Syntax of configuration file is much simpler and easier to maintain than code in C header file. This is the main reason to use such an approach.
Configuration file
Configuration file is a simple text file. It is divided into several sections.
Comments
Comments are used to give additional explanations. They begin with // or # and continue until the end of line.
Sections
Section is a part of configuration file that begins with a section header and ends when another section header is reached. Syntax of section header:
[SECTION_ID section_name]:where
SECTION_ID — section identifier, usually in uppercase and may consist of several words, for example CONFIG, END etc.
section_name — optional name for the section, used to distinguish beetwen sections with the same IDs.
Section CONFIG
This section is common but not necessary. It contains parameters that describe your project.
Each parameter must be specified on a separate line without line breaks. It has simple syntax:
<param_name> = <param_value> // possible commentSection END
This section is necessary. It marks the end of file. Colon in this section is optional. Do not forget to place this section at the end of file!
Example of configuration file
[CONFIG]:
parameter1 = value1 // comment
[WORK SECTION]:
data1 = data_value1 // comment
[END] # end of fileGenerating C header
Once you have prepared configuration file for your project, you need to convert it to C code that can be included in your software project. Run in console (Windows):
multiCodeGen-win32.exe -l library -i _configFile.txt -o myGeneratedCheader.hwhere
-i <file>specifies your configuration file,-o <file>specifies your C header file with generated code,-l <lib>specifies library for which code will be generated (see table below),-lkey valuesgsmenu
More commands
To see all available commands and their short explanation type:
multiCodeGen-win32.exe -hHighlighting in Notepad++
If you use Notepad++ text editor for editing configuration files, then you can enable syntax highlighting. Just import multiCodeGen-syntax-notepad++.xml file:
- Open Notepad++, go
Language>User Defined Language>Define your language.... - Click
Importbutton and select multiCodeGen-syntax-notepad++.xml file. - Close User-Defined window.
For .txt configuration files you must select highlighter in Language menu every time when opening file. You can also use .mcg / .gen extension for configuration file to apply this highlighter automatically on opening file.
Contributing & feedback
Contributions and feedback are welcome! Not only will you help develop the library, but you’ll also learn how to use it best.
If you find some bugs or want to suggest an idea, please open an issue here. Before creating new issue, check if it has not been opened earlier.
License
multiCodeGen is distributed under MIT license.
(c) 2026, Riva Lab
