Author Topic: Need help setting up the toolchain for Codeblocks 10.05 using GCC-TDM compiler.  (Read 8456 times)

Offline verthex

  • Multiple posting newcomer
  • *
  • Posts: 15
Before someone tells me to upgrade to the newest Codeblocks I want you to realize that this problem is the same regardless of whichever version I use. I did this with 12 as well and got the same result.

Thus far I downloaded the TDM compiler (the file mingw-w64-bin-x86_64-20130601.7z from http://www.drangon.org/mingw) and installed it into C:\mingw64.

Then I went into the settings-> compiler and debugger->under the tab "Toolchain Executables" I put C:\mingw64\bin (yes I made sure gcc, g++ and the others are pointing to c:\mingw64\bin).

Under the "Additional Paths" tab I placed  C:\mingw64\bin

After that I created a new C++ project called hello world which looks like this...

Code
#include <iostream>

int main()
{
    std::cout<<"Hello World! "<<std::endl;

    return 0;
}

and pressed F9 to build and run but then I got this???  :-\

Compiling: hello_world.cpp
Execution of 'g++.exe -Wall  -g    -IC:\mingw64\lib\gcc\x86_64-w64-mingw32\4.8.1\include  -c "C:\Documents and Settings\verthex\My Documents\project6\hello_world\hello_world.cpp" -o obj\Debug\hello_world.o' in 'C:\Documents and Settings\verthex\My Documents\project6\hello_world' failed.
Nothing to be done.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7607
    • My Best Post
FYI: I do NOT think, You download the TDM GCC.

http://tdm-gcc.tdragon.net/

I suggest testing the Compiler you download and see if it works.

Edit: Several non-official builds of MinGW GCC do NOT like spaces or special characters in the path; the compiler you picked might be one of them.

Edit2: Do you have a 64-bit Windows OS?

Tim S.
« Last Edit: July 04, 2013, 10:40:46 pm by stahta01 »
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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
I did this with 12 as well and got the same result.
But this doesn't invalidate the switch to the newer version advice :)
12.11 has better diagnostics :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline verthex

  • Multiple posting newcomer
  • *
  • Posts: 15
FYI: I do NOT think, You download the TDM GCC.

http://tdm-gcc.tdragon.net/

I suggest testing the Compiler you download and see if it works.

Edit: Several non-official builds of MinGW GCC do NOT like spaces or special characters in the path; the compiler you picked might be one of them.

Edit2: Do you have a 64-bit Windows OS?

Tim S.

Thanks Tim. I downloaded the bundle installer for 32-bit (
tdm-gcc-4.7.1-2) from here http://tdm-gcc.tdragon.net/download and then I installed it into C:/mingw32.

I then set my toolchain and the additional paths to C:/mingw32/bin. I then pressed F9 and bingo! it works.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
... the additional paths to C:/mingw32/bin....
If you've set the toolchain base path to be "c:\mingw32" then you don't have to set the additional path!
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]