Save your leo file & reopen it to make sure the base path isn't Leo's installation folder!
Start by creating a node and name it @xcc myprogram and press enter.
Note that the @language c++ directive was inserted at the beginning of the body text. A row of buttons also appeared on top of the body pane. These buttons are available when an xcc node or one of it's descendants is selected.
Before anything else, with that xcc node still selected, click the config button ...
The default, blank configuration, won't be of much help.Click the "Load..." button at the bottom of the panel to browse for a configuration file instead of building your own custom configuration from scratch.
Select one of the .xcc file, that matches a compiler package installed on your system.
Xcc configurations can be exported to .xcc files, Xcc nodes also keep their settings when copy/pasted.
Look at the compiler path: you may use the "Browse" button if it does not match your installation folder.
If so, make sure to also change the two other white boxes below arguments. (Namely Include search paths and Library search paths)

To debug, watch variables and step through breakpoint:
select the debug tab and change the debugger path.
If you have set those four paths correctly, you are ready to write a program.
Create two child nodes, in the first one, write header directives such as #include <stdio.h>
Name the second one int main();! (with the semicolon and exclamation mark)

Fill the function's body without opening or ending tokens : type name( ){ ... }
Click the play button start the xcc process and create both header and source files.
If 'Compile' is checked, the executable will be created.
The 'Debug' checkbox makes the executable run through a debugger where breakpoints, stepping and variable watch can be used.
When an xcc process is started, it's main node gets marked until it finishes and the current line is found and highlighted.
Breakpoints can also be added live, while debuging.
Expressions and variable names can be entered in the edit bar of the watch pane. Press the button to toggle the watch pane.
This unrelated screenshot shows a lot of different nodes and runs fine!
|