User forums > Help

CodeBlocks not Building

(1/1)

Steve:
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.

BlueHazzard:
There are 100000 of forum posts with this problem

Try to search the forum...

One thing that comes my mind: Settings->Compiler->Executables->Autodetect

stahta01:
I suggest using an CB Project!
http://wiki.codeblocks.org/index.php/Creating_a_new_project

Steve:
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.

stahta01:
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

Navigation

[0] Message Index

Go to full version