Code::Blocks Forums

User forums => Help => Topic started by: Steve on July 11, 2019, 12:23:55 pm

Title: CodeBlocks not Building
Post by: Steve on July 11, 2019, 12:23:55 pm
Trying to learn the basics of C++ (https://www.w3schools.com/cpp/cpp_getstarted.asp) - I did this successfully: http://www.codeblocks.org/downloads/26 Download the mingw-setup.exe file, which will install the text editor with a compiler.
Instructed next to startup Codeblocks (using 17.12) and do File>New>Empty File – Save given code as myfirstprogram.cpp (in Desktop\C++)
Then Build>Build and Run => nothing happens.

... I went to Settings>Compiler and replaced 'no compiler' with GNU GCC Compiler. Tried Build. In Build Log:
-------------- Build file: "no target" in "no project" (compiler: unknown)---------------
mingw32-g++.exe   -c C:\Users\sthay\Desktop\C++\myfirstprogram.cpp -o C:\Users\sthay\Desktop\C++\myfirstprogram.o
Execution of 'mingw32-g++.exe   -c C:\Users\sthay\Desktop\C++\myfirstprogram.cpp -o C:\Users\sthay\Desktop\C++\myfirstprogram.o' in 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\CodeBlocks' failed.
Title: Re: CodeBlocks not Building
Post by: BlueHazzard on July 11, 2019, 04:23:10 pm
There are 100000 of forum posts with this problem

Try to search the forum...

One thing that comes my mind: Settings->Compiler->Executables->Autodetect
Title: Re: CodeBlocks not Building
Post by: stahta01 on July 11, 2019, 09:19:21 pm
I suggest using an CB Project!
http://wiki.codeblocks.org/index.php/Creating_a_new_project (http://wiki.codeblocks.org/index.php/Creating_a_new_project)
Title: Re: CodeBlocks not Building
Post by: Steve on July 12, 2019, 03:27:03 pm
Blue Hazzard, thanks, I did try.
Stahta01, I tried creating a new console project, and have made progress but have a fresh issue or two to look at.

Venting: I'm somewhat disappointed in https://www.w3schools.com/cpp/cpp_getstarted.asp doc and may tell them.
Title: Re: CodeBlocks not Building
Post by: stahta01 on July 12, 2019, 05:34:04 pm
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F)