News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Building Error

Started by Jeman, May 27, 2012, 01:29:05 AM

Previous topic - Next topic

Jeman

So I used the default script:

#include <iostream>

using namespace std;

int main()
{
   cout << "Hello world!" << endl;
   return 0;
}

I click the Build button which looks like a gear and on the log i get this error:
-------------- Build: Debug in Tutorial 1 ---------------

Compiling: main.cpp
Execution of 'mingw32-g++.exe -Wall -fexceptions  -g     -c "C:\Users\Jordan\Desktop\C++ Stuffs\Tutorials\Tutorial 1\main.cpp" -o obj\Debug\main.o' in 'C:\Users\Jordan\Desktop\C++ Stuffs\Tutorials\Tutorial 1' failed.
Nothing to be done.

It is a Console Application.
On C++.
With the GNU GCC Compiler
Solutions? ???


Alpha


stahta01

Quote from: Alpha on May 27, 2012, 01:33:45 AM
Do you have a compiler installed?

Do you have a C++ Compiler Installed?
In this case, it is looking for "mingw32-g++.exe" as the C++ Compiler executable.

Tim S.
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]

Jeman

Well i downloaded codeblocks-10.05mingw-setup.exe from the binaries section and it is supposed to install the compiler.

stahta01

Quote from: Jeman on May 27, 2012, 02:10:33 AM
Well i downloaded codeblocks-10.05mingw-setup.exe from the binaries section and it is supposed to install the compiler.

I have no idea; if the user can turn off the installing of the C++ Compiler.
I would confirm the C++ Compiler was installed!

After that, I would turn on Full Compiler Logging.

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

Tim S.

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]

Jeman

#5
I followed those instructions and this is all i get in the Build Log
-------------- Build: Debug in LOLOL ---------------

mingw32-g++.exe -Wall -fexceptions  -g     -c "C:\Users\Jordan\Desktop\C++ Stuffs\Tutorials\LOLOL\main.cpp" -o obj\Debug\main.o
Execution of 'mingw32-g++.exe -Wall -fexceptions  -g     -c "C:\Users\Jordan\Desktop\C++ Stuffs\Tutorials\LOLOL\main.cpp" -o obj\Debug\main.o' in 'C:\Users\Jordan\Desktop\C++ Stuffs\Tutorials\LOLOL' failed.
Nothing to be done.
Also when i installed it i selected full installiation

stahta01

#6
So you confirmed the exe existed; what folder was the exe inside of?

What folder is the Code::Blocks toolchain set to use?
(Also called the Compiler's Installation Directory)
seen via "Settings->Compiler and Debugger->Global Compiler settings->Toolchain executables"


Tim S.  
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]

Jeman

C:\Program Files\CodeBlocks\MinGW

stahta01

Quote from: Jeman on May 27, 2012, 02:58:01 AM
C:\Program Files\CodeBlocks\MinGW

You MUST CONFIRM
that the file mingw32-g++.exe exists inside the folder "C:\Program Files\CodeBlocks\MinGW\bin".
Does it exist?

Tim S.
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]

stahta01

#9
What is needed to be done to test the command issued by CB works on the command line.
Open the CMD.exe command window and enter the below lines one at a time.
NOTE: You can skip the line(s) starting with REM.

REM Set path to what CB uses
SET PATH=C:\Program Files\CodeBlocks\MinGW\bin;%PATH%

REM Directory to what CB used
CD /D "C:\Users\Jordan\Desktop\C++ Stuffs\Tutorials\LOLOL"

REM Command used by CB
mingw32-g++.exe -Wall -fexceptions -g -c "C:\Users\Jordan\Desktop\C++ Stuffs\Tutorials\LOLOL\main.cpp" -o obj\Debug\main.o
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]