News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

TDM's unofficial GCC 4.2.0 for MinGW (now with OpenMP, Fortran and Obj-C)

Started by TDragon, May 18, 2007, 11:36:45 PM

Previous topic - Next topic

TDragon

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
[url="https://jmeubank.github.io/tdm-gcc/"]https://jmeubank.github.io/tdm-gcc/[/url] - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

AmR EiSa

Hello

:?

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

by this code only :(

#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

TDragon

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?
[url="https://jmeubank.github.io/tdm-gcc/"]https://jmeubank.github.io/tdm-gcc/[/url] - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

snija


TDragon

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?
[url="https://jmeubank.github.io/tdm-gcc/"]https://jmeubank.github.io/tdm-gcc/[/url] - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

snija

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/

TDragon

[url="https://jmeubank.github.io/tdm-gcc/"]https://jmeubank.github.io/tdm-gcc/[/url] - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

snija

Unfortunately, there`s no libgomp.a in lib directory.

patlecat

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:
:: === 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??

TDragon

@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.
[url="https://jmeubank.github.io/tdm-gcc/"]https://jmeubank.github.io/tdm-gcc/[/url] - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Outis

The build works fine for me, thank you!

patlecat

Quote from: TDragon on May 19, 2007, 04:05:31 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.

TDragon

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.
[url="https://jmeubank.github.io/tdm-gcc/"]https://jmeubank.github.io/tdm-gcc/[/url] - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

patlecat

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?

stahta01

#14
Quote from: patlecat 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?

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
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]