Author Topic: CodeBlocks not Building  (Read 7709 times)

Offline Steve

  • Single posting newcomer
  • *
  • Posts: 2
CodeBlocks not Building
« 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.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: CodeBlocks not Building
« Reply #1 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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: CodeBlocks not Building
« Reply #2 on: July 11, 2019, 09:19:21 pm »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Steve

  • Single posting newcomer
  • *
  • Posts: 2
Re: CodeBlocks not Building
« Reply #3 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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org