Author Topic: TDM's unofficial GCC 4.2.0 for MinGW (now with OpenMP, Fortran and Obj-C)  (Read 113155 times)

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
GCC 4.2.0 TDM-4 is now available! Fortran and Objective-C language packages have been added (and the core/C and C++ packages made separate), and all files are now hosted on SourceForge. As always, you should be able to install in almost any directory (I recommend one without spaces), and use it from almost any directory (unless you're running Vista). Please do a clean reinstall to use this version; don't extract it on top of a previous version.

See http://www.tdragon.net/recentgcc/ for details.


====== Older =======

By popular request, I have made OpenMP available in my GCC 4.2.0 binary package (the "-fopenmp" option). See http://www.tdragon.net/recentgcc/ for details.

------------------------

I have built a C and C++ binary distribution of GCC 4.2.0 as a drop-in replacement for MinGW's gcc-core and gcc-g++ packages. See http://www.tdragon.net/recentgcc.html for details.

For a list of changes from the GCC 4.1 series, see http://gcc.gnu.org/gcc-4.2/changes.html.

As usual, I have tested this build by compiling wxWidgets and Code::Blocks, and everything works great!

Due to the popularity of my previous GCC 4.1.2 build, I had to stop hosting it on my website's server, leaving FileFront as the only option. However, a couple of people have complained that the FileFront download doesn't work for them. If you can provide a mirror for the binary and source packages (a 3-MB file and a 70-MB file), please email me at tdragon-at-tdragon-dot-net -- those users and I would appreciate it.

Cheers,
John E. / TDM
« Last Edit: July 09, 2007, 10:11:50 pm by TDragon »
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

Offline AmR EiSa

  • Multiple posting newcomer
  • *
  • Posts: 75
Re: Unofficial GCC 4.2.0 for MinGW available
« Reply #1 on: May 19, 2007, 03:08:01 am »
Hello

 :?

did u try build console app by c++ by it ?

by this code only :(

Code: [Select]
#include <iostream>

using namespace std;

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

i got that error
c:\program files\codeblocks\bin\..\lib\gcc\mingw32\4.2.0\..\..\..\..\include\c++\4.2.0\cwctype:90: error: '::iswblank' has not been declared
:: === Build finished: 1 errors, 0 warnings ===

it's very strang :(

i have last build

AmR EiSa

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: Unofficial GCC 4.2.0 for MinGW available
« Reply #2 on: May 19, 2007, 03:49:17 am »
That code compiles and runs fine for me. Have you made any modifications to your installation? Have you tried installing all the necessary packages from scratch in an empty directory?
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

Offline snija

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: Unofficial GCC 4.2.0 for MinGW available
« Reply #3 on: May 19, 2007, 04:32:35 am »
why no gomp?

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: Unofficial GCC 4.2.0 for MinGW available
« Reply #4 on: May 19, 2007, 04:39:06 am »
I hadn't even heard of "GOMP" until you mentioned it and I looked it up. I still don't know what relation it has to GCC. Could you explain it?
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

Offline snija

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: Unofficial GCC 4.2.0 for MinGW available
« Reply #5 on: May 19, 2007, 05:18:49 am »
gomp stands up for GNU Open MP
gcc 4.2 is the first version which supports this feature.
http://gcc.gnu.org/onlinedocs/gcc-4.2.0/libgomp/

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: Unofficial GCC 4.2.0 for MinGW available
« Reply #6 on: May 19, 2007, 05:55:55 am »
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

Offline snija

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: Unofficial GCC 4.2.0 for MinGW available
« Reply #7 on: May 19, 2007, 06:22:36 am »
Unfortunately, there`s no libgomp.a in lib directory.

Offline patlecat

  • Multiple posting newcomer
  • *
  • Posts: 62
Re: Unofficial GCC 4.2.0 for MinGW available
« Reply #8 on: May 19, 2007, 02:10:13 pm »
I too have errors compiling the above mentioned simplest console program:

#include <iostream>

using namespace std;

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


...and got the following errors in CodeBlocks:
Code: [Select]
:: === consoleTest, Release ===
obj\Release\main.o:main.cpp:(.text+0x30):: undefined reference to `std::ios_base::Init::Init()'
obj\Release\main.o:main.cpp:(.text+0x3e):: undefined reference to `std::ios_base::Init::~Init()'
obj\Release\main.o:main.cpp:(.text+0x99):: undefined reference to `std::cout'
obj\Release\main.o:main.cpp:(.text+0x9e):: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'
obj\Release\main.o:main.cpp:(.text+0xa5):: undefined reference to `std::cout'
obj\Release\main.o:main.cpp:(.text+0xaa):: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)'
:: === Build finished: 6 errors, 0 warnings ===

I did install TDragons gcc-4.1.2-mingw-setup.exe into a new directory, which should include all the necessary packages (except gdb) and just copied the files from gcc-4.2.0-tdm-1.7z over it. I manually replaced the gcc4.1.2 files in the bin directory with those from 4.2 and did the same in Codeblocks.

So, what is wrong??

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: Unofficial GCC 4.2.0 for MinGW available
« Reply #9 on: May 19, 2007, 04:05:31 pm »
@snija:
I'm afraid I have no idea what to do differently in order to have libgomp.a created; if you find out, though, I'd be more than happy to do a rebuild.

@patlecat:
I do not distribute "gcc-4.1.2-mingw-setup.exe"; I believe you're referring to Giovanni's installer available from http://www.develer.com/oss/GccWinBinaries. In any case, it may be that some files from the 4.1.2 package are confusing the new 4.2.0 package, so you should try installing it in a directory that doesn't already have a gcc package installed.
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

Offline Outis

  • Multiple posting newcomer
  • *
  • Posts: 26
Re: Unofficial GCC 4.2.0 for MinGW available
« Reply #10 on: May 19, 2007, 04:40:17 pm »
The build works fine for me, thank you!

Offline patlecat

  • Multiple posting newcomer
  • *
  • Posts: 62
Re: Unofficial GCC 4.2.0 for MinGW available
« Reply #11 on: May 19, 2007, 08:17:37 pm »
@patlecat:
I do not distribute "gcc-4.1.2-mingw-setup.exe"; I believe you're referring to Giovanni's installer available from http://www.develer.com/oss/GccWinBinaries. In any case, it may be that some files from the 4.1.2 package are confusing the new 4.2.0 package, so you should try installing it in a directory that doesn't already have a gcc package installed.

TDragon: First of all I must thank you for your outstanding work I really appreciate it! :P

I did not mention, that I could compile wxWidgets 2.8.4 with that configuration and that I can create programs out of Dialogblocks with no problem at all!!
But somehow nothing ever compiled in Codeblocks, neither with gcc4.1.2 nor 4.2 :(


BTW u mention a "All-in-One Installer" made by Giovanni, but all I found was the 4.1.2 installer. Nothing for 4.2 yet.

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: Unofficial GCC 4.2.0 for MinGW available
« Reply #12 on: May 19, 2007, 09:47:15 pm »
Giovanni's all-in-one installer does indeed use my GCC 4.1.2 package rather than the new 4.2.0, so if you really want to use 4.2.0 you'll have to do things by hand as outlined on my information page and in the readme.

If you reinstall the necessary packages in an empty directory and still get errors, post them and I'll see about helping you to resolve them.
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

Offline patlecat

  • Multiple posting newcomer
  • *
  • Posts: 62
Re: Unofficial GCC 4.2.0 for MinGW available
« Reply #13 on: May 19, 2007, 10:20:32 pm »
Thanks for the kind offer man, but dont you find it strange that such a complex  lib like wxWidgets can be compiled with no flaws and that another tool namely Dialogblocks compiles everything just fine - whereas CodeBlocks is unable to compile even the simplest of all programs??

So what would that reinstall bring me other than just a lot of work? What could be a good reason to do it?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6661
    • My Best Post
Re: Unofficial GCC 4.2.0 for MinGW available
« Reply #14 on: May 19, 2007, 11:55:40 pm »
Thanks for the kind offer man, but dont you find it strange that such a complex  lib like wxWidgets can be compiled with no flaws and that another tool namely Dialogblocks compiles everything just fine - whereas CodeBlocks is unable to compile even the simplest of all programs??

So what would that reinstall bring me other than just a lot of work? What could be a good reason to do it?

Since, you do not know the difference between an IDE and an Compiler, I have no idea if it will bring you anything.

If you want help to confirm the cause of the problem, try turning on the Code::Blocks option for the compiler to do full compiler logging. This would help to see if it's an Compiler issue or a Code::Blocks setting that needs adjustment.

Steps to turn on Compiler Logging:
"Settings" -> "compiler debugger"
Change "Compiler Settings" to "Other Settings"
Set "Compiler Logging" to "Full Command Line"

Tim S
« Last Edit: May 20, 2007, 12:02:23 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org