User forums > Using Code::Blocks
Using code::blocks w/o a project
Pecan:
--- Quote from: dukester on January 27, 2024, 06:32:46 pm ---
--- Quote from: Pecan on January 27, 2024, 06:14:23 pm ---I found an even easier way to create the file.
Menu/File/new/Empty file.
Paste the code into the file.
Menu/File/Save as/ c:\temp\HelloWorld.cpp (or any other folder, as long as it's not a protected OS folder.
Menu/Build
Menu/Build/Run
--- End quote ---
Right on! Thx, but I still get that error msg from code::blocks.
--- End quote ---
What OS and what version of CodeBlocks are you using?
show us your hello world code inside codetags (the # above a reply box).
Miguel Gimenez:
You must install and configure a compiler.
dukester:
What OS and what version of CodeBlocks are you using?
show us your hello world code inside codetags (the # above a reply box).
[/quote]
gcc --version
gcc (Debian 10.2.1-6) 10.2.1 20210110
codeblocks -h
Starting Code::Blocks Release 20.03 rev 11983 Feb 20 2020, 19:35:00 - wx3.0.2 - gcc 6.3.0 (Linux, unicode) - 64 bit
--- Code: ---cat hello.c
#include <stdio.h>
int main(){
printf("Hello World from Turner Valley!\n");
printf("This program was compiled in the emacs editor.\n");
return 0;
}
--- End code ---
Pecan:
Make sure that your Menu/Settings/Compiler/ToolChain_executables look like this:
dukester:
Thx for the screenshot!! Yup! Got it set up that way also!
I have zero probs from the CLI / emacs / geany. Compiles like a charm. I just got the notion to test-drive code::blocks! Too much grief it seems.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version