I brought up (in a VMware) Linux Mint 21.x:
Name : Code::Blocks
Version : 20.03-r11997
SDK Version : 2.0.0
Scintilla Version: 3.7.5
Author : The Code::Blocks Team
E-mail : info@codeblocks.org
Website :
http://www.codeblocks.orgwxWidgets Library (wxGTK port)
Version 3.0.5 (Unicode: wchar_t, debug level: 1),
Runtime version of toolkit used is 3.24.
Compile-time GTK+ version is 3.24.33.
I disabled all plugins except: (via Menu/Plugins/Manage Plugins)
Abbreviations
AutoVersioning
Autosave
BrowseTracker
Compiler
Debugger
DragScroll
Files extension handler
Foreign projects Importer
Header Fixup
Help pllugin
IncrementalSearch
Keyboard shortcuts
OccurrencesHighlighting
Open files list
ReopenEditor
Scripted wizard
SmartIndentCpp
SmartIndentXml
Source Exporter
Source code formatter
ThreadSearch
Todo List
wxSmith
sxSmith-Aui
wxSmith-Contrib Items
wxSmith-MIME plugin
I
restarted CB after disabling plugins.
I performed the following.
1) Menu/File/New/EmptyFile
2 copy/pasted your code into the Untiled1 editor.
3) Menu/File/Save as/ into Home/pecan/temp/HellowWorld.c
4) Menu/Build/Build
5) Menu/Build/Run
The results are in the .jpg attached.
Build Messages
||=== Build file: "no target" in "no project" (compiler: unknown) ===|
||=== Build finished: 0 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
Build Log
-------------- Build file: "no target" in "no project" (compiler: unknown)---------------
gcc -c /home/pecan/Temp/HelloWorld.c -o /home/pecan/Temp/HelloWorld.o
gcc -o /home/pecan/Temp/HelloWorld /home/pecan/Temp/HelloWorld.o
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
Checking for existence: /home/pecan/Temp/HelloWorld
Executing: 'xterm -T '/home/pecan/Temp/HelloWorld' -e '/usr/bin/cb_console_runner' '/home/pecan/Temp/HelloWorld'' (in '/home/pecan/Temp')
Set variable: LD_LIBRARY_PATH=