Installation¶
This guide will help you install CacaoLang on your system.
Prerequisites¶
Required¶
- C++ Compiler (g++ with C++17 support)
- pkg-config
Optional (for GUI support)¶
- GTK4 development libraries
Platform-Specific Installation¶
Building CacaoLang¶
Clone the Repository¶
Compile the Interpreter¶
With GUI Support¶
Without GUI Support¶
Install System-Wide (Optional)¶
# Linux/macOS
sudo cp choco /usr/local/bin/
# Or add to your PATH
export PATH="$PATH:/path/to/cacaolang"
Verify Installation¶
Test that CacaoLang is installed correctly:
You should see the REPL welcome message:
======================================
CacaoLang 1.2.5 - Coco Loco
REPL (mochalx v1.4.9)
Type 'exit' or 'quit' to leave
======================================
choco:1>
Check GUI Support¶
To verify GUI support is available:
Troubleshooting¶
GTK4 Not Found¶
If you get GTK4-related errors:
-
Verify GTK4 is installed:
-
Check pkg-config can find GTK4:
-
Compile without GUI support using
-DCHOCO_NO_GUI
Compilation Errors¶
If you encounter C++ compilation errors:
- Ensure you have C++17 support:
g++ --version(need GCC 7+ or Clang 5+) - Check that all source files are present
- Try cleaning and rebuilding
Permission Denied¶
If you can't execute the choco binary:
Next Steps¶
Now that CacaoLang is installed, proceed to: