News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

CodeBlocks not Building

Started by Steve, July 11, 2019, 12:23:55 PM

Previous topic - Next topic

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

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

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

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]