Author Topic: TDM-GCC 4.5 series (Latest: 4.5.2 - 2011-03-27)  (Read 73907 times)

Offline AlisdairM

  • Single posting newcomer
  • *
  • Posts: 6
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #15 on: June 09, 2010, 11:29:15 pm »
I am currently implementing my own C++0x standard library, using all the 0x features from the ground up.  For instance, 0x is supposed to solve a number of syntax inconsistencies by allowing brace-initialization *everywhere*, so this is the only initialization I use. Likewise, I am exclusively using the new function syntax, and the new type-alias syntax once it becomes available.  Many of the template tricks that earlier libraries relied on will no longer be necessary, so I get cleaner code.

Why do I mention this?  So far I have been doing all that development using TDM GCC and CodeBlocks <g>.
As it happens, I just migrated to the mac so get easier access to the 4.6 preview builds, but GCC 4.5 is full of 0x goodness, and you can go a long way with this now.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #16 on: June 10, 2010, 12:30:40 am »
TDM-GCC finally returns with even more goodness packed into one easy-to-use Windows installer.
Which finally means that there is a gcc 4.5 build that doesn't suck ass. Or in other words, one that doesn't fail to build 80% of your stuff (have to wonder why the original MinGW team can't do that...).
Thank you, John. You rule :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #17 on: June 10, 2010, 02:38:20 pm »
My fondest wish is for the official MinGW releases to someday negate the benefits of TDM-GCC... but until that day comes, you're welcome.
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

stefanos_

  • Guest
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #18 on: June 10, 2010, 09:42:36 pm »
TDragon, I have tdm-mingw-1.908.0-4.4.1-2.exe installed on my system and I would like to upgrade to the latest version tdm-gcc-4.5.0.exe. I have downloaded first the on demand installer and didn't give me the option to upgrade the existing installation.

I then downloaded the bundled edition and tried the same thing; it cannot detect the installed directory.

What shall I do? Shall I uninstall the old version and install the new one? Should not there be an upgrade method for old versions to the latest ones? Shall it be a future request? I think it should be an automated process with less than 2-3 clicks, not a whole install-uninstall process.

Please advice.

Cheers and keep up the good work.

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #19 on: June 10, 2010, 10:30:02 pm »
Ah, my apologies. Though it's not at all obvious, I've made changes to the installation system such that a 4.5.0 installation and a 4.4.1 installation are recognized differently. Therefore, although I intend for most upgrade scenarios to work as you say, this one won't. You will need to uninstall 4.4.1 first if you want to place 4.5.0 in the same location.

Future upgrades should work as expected. Again, I apologize for the breakage.
-John E. / TDM
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

stefanos_

  • Guest
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #20 on: June 10, 2010, 10:42:12 pm »
Thank you very much for your reply. I am pretty sure that others as well, will experience the same situation and they will ask for the same thing.

If I may, I would suggest you point that out to either your website as a notification, or to Code::Blocks's forum as a separate sticky announcement.

Thanks for once again.

stefanos_
« Last Edit: June 11, 2010, 07:12:57 am by stefanos_ »

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #21 on: June 11, 2010, 05:02:03 pm »
Hmm... seems I was a little bit too enthusiastic :(

With gcc 4.5, I'm now getting this in one of my projects:
In file included from z:\gcc45\bin\../lib/gcc/mingw32/4.5.0-dw2/include/c++/cmath:629:0,
                 from [...]/mingw32/4.5.0-dw2/include/c++/random:38,
                 from [...]/mingw32/4.5.0-dw2/include/c++/bits/stl_algo.h:66,
                 from [...]/mingw32/4.5.0-dw2/include/c++/algorithm:63,
                 from [...]:
[...]/4.5.0-dw2/include/c++/tr1_impl/cmath:147:11: error: '::double_t' has not been declared
[...]/4.5.0-dw2/include/c++/tr1_impl/cmath:148:11: error: '::float_t' has not been declared


Unluckily, I can't seem to reproduce it in a simple Hello World project (compiles just fine when I try there!). If I typedef float_t and double_t before including <algorithm>, the error is fixed.

Windres reports a syntax error on a RC file which is 100% good (can work around by using the previous version's binary).

And finally: [...]/4.5.0-dw2/../../../crt2.o:crt1.c:(.text+0x28): undefined reference to `__dyn_tls_init_callback' is where I gave up. Note that I'm not using any TLS at all, at least not consciously -- maybe OpenAL does behind my back :)
It might be noteworthy to tell that the same, identical project compiles its 974 files with a total of 3 warnings (two are a unused parameter in a callback function, and the third comes from using a MSVC import library) under gcc 4.4 with pretty much every available warning turned on.

Seems with gcc 4.5 we're still a bit too deep in alpha stage. Still, your build gets much closer to "successful" than the original MinGW build, which emits about 1500 warnings and 50 errors before bailing out, most of which are totally obscure (and which I honestly didn't bother to look at further), and some of which are related to Graphite not being compiled in.
So, still, great work :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #22 on: June 11, 2010, 07:25:18 pm »
And finally: [...]/4.5.0-dw2/../../../crt2.o:crt1.c:(.text+0x28): undefined reference to `__dyn_tls_init_callback' is where I gave up. Note that I'm not using any TLS at all, at least not consciously -- maybe OpenAL does behind my back :)
This happens when you have an older installation in X:\MinGW (or when not all object files have been rebuilt with the new GCC). Per the README and the Getting Started installation notes, GCC currently searches "/mingw" no matter what, so if you have multiple installations you can't have one there. I will *probably* change this in the next release, although it will mean a further departure from GNU standards.

If you can send me an RC file that should work and doesn't, I can downgrade the installer default to the previous binutils release and try to make sure it gets fixed for the next one.

Finally, if you're interested in installing the TDM64 edition, I'd be interested to see if you got the same errors using that edition and "-m32".

-John E. / TDM
« Last Edit: June 11, 2010, 07:27:39 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 thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #23 on: June 13, 2010, 02:15:58 am »
This happens when you have an older installation in X:\MinGW (or when not all object files have been rebuilt with the new GCC).
My installations are Z:\gcc44 and Z:\gcc45, respectively. The installations share a folder that holds the OpenGL, OpenAL, Ogg, Vorbis includes (made available to the compiler via the -I flag, which should be legitimate). Rebuild was done by hitting the "clean rebuild" button in c::b which hopefully should sufficiently erase everything. So, hmm... not sure what's wrong then.

Quote
If you can send me an RC file that should work and doesn't
Will see to that on monday (not at that machine now).

Quote
Finally, if you're interested in installing the TDM64 edition
Generally intersted yes, but unluckily no Windows 64 system here (only Linux 64, though maybe Wine may be worth trying?).
« Last Edit: June 13, 2010, 02:18:03 am by thomas »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #24 on: June 13, 2010, 03:21:43 am »
This happens when you have an older installation in X:\MinGW (or when not all object files have been rebuilt with the new GCC).
My installations are Z:\gcc44 and Z:\gcc45, respectively. The installations share a folder that holds the OpenGL, OpenAL, Ogg, Vorbis includes (made available to the compiler via the -I flag, which should be legitimate). Rebuild was done by hitting the "clean rebuild" button in c::b which hopefully should sufficiently erase everything. So, hmm... not sure what's wrong then.
Odd. If you feel like sending me the link command line I might see if I can figure it out and/or reproduce it.

Quote
Quote
Finally, if you're interested in installing the TDM64 edition
Generally intersted yes, but unluckily no Windows 64 system here (only Linux 64, though maybe Wine may be worth trying?).
You can run the TDM64 edition on a 32-bit machine; although the compiler can generate 64-bit code, it's built as 32-bit binaries.
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

stefanos_

  • Guest
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #25 on: June 13, 2010, 04:21:45 pm »
Hello TDragon.

I think I have found a bug. While I was working on a certain example from a book of mine, I have discovered a bug regards to istream_iterator.

The code I used is this:

Code: [Select]
// ioiter1.cpp
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>

int main()
{
    using namespace std;    // all symbols in std are global

    vector<string> coll;    // vector container for strings

    /* read strings from the standard input up until the end of the data
     * - copy from the 'input collection' cin, inserting into coll
     */
    copy(istream_iterator<string>(cin),     // start of source range
         istream_iterator<string>(),        // end of source range
         back_inserter(coll));              // destination range

    // sort elements in coll
    sort(coll.begin(), coll.end());

    /* output all elements
     * - copy from coll to the 'output collection' cout
     * - every string on its own line (separated by "\n")
     */
    copy(coll.begin(), coll.end(),              // source range
         ostream_iterator<string>(cout, "\n")); // destination range
}


A special thanks goes to Nicolai M. Josuttis, author of book Object-Oriented Programming in C++, for composing such an amazing book.

The error report by compiler is this:

C:\Projects\Josuttis_OOP\Chapter_03\17. IOiter1\ioiter1.cpp||In function 'int main()': |
C:\Projects\Josuttis_OOP\Chapter_03\17. IOiter1\ioiter1.cpp|16|error: 'istream_iterator' was not declared in this scope|
C:\Projects\Josuttis_OOP\Chapter_03\17. IOiter1\ioiter1.cpp|16|error: expected primary-expression before '>' token|
C:\Projects\Josuttis_OOP\Chapter_03\17. IOiter1\ioiter1.cpp|17|error: expected primary-expression before '>' token|
C:\Projects\Josuttis_OOP\Chapter_03\17. IOiter1\ioiter1.cpp|17|error: expected primary-expression before ')' token|
C:\Projects\Josuttis_OOP\Chapter_03\17. IOiter1\ioiter1.cpp|28|error: 'ostream_iterator' was not declared in this scope|
C:\Projects\Josuttis_OOP\Chapter_03\17. IOiter1\ioiter1.cpp|28|error: expected primary-expression before '>' token|
C:\Projects\Josuttis_OOP\Chapter_03\17. IOiter1\ioiter1.cpp|28|warning: left-hand operand of comma has no effect|
||=== Build finished: 6 errors, 1 warnings ===|


I have pastebin-ed the current code and asked for help from Freenode's #C++-basic and tested it on Codepad and compiled just fine.

Can you please test this code with your 4.5.0 version and provide me your feedback? That would be greatly appreciated.

I'm waiting for anyone's reply.

Regards,

stefanos_

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11899
    • Travis build status
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #26 on: June 13, 2010, 04:27:23 pm »
stefanos_: Have you tried to include <iterator> ?

In gcc 4.5.0 the standard conformance is improved and the c++ standard says (I think),
that if you use something from the std namespace you should include the header, where it has been defined.
(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 killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5177
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #27 on: June 13, 2010, 04:37:29 pm »
istream_iterator  --> you need to include <iterator>.

So the code is wrong. By the way, I somewhat remember that in Josuttis STL book (which is GREAT), there were also includes missing. So always be careful with book examples, because most of the time the author was focusing on something different and didn't most probably pay attention if all includes are OK (or ensure there are no memory leaks), they also copy paste from one example to another ;-)

stefanos_

  • Guest
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #28 on: June 13, 2010, 06:27:42 pm »
Thank you both for your replies.

I just found the book's errata file and indeed, a missing iterator header was causing the whole thing to fall apart.

Fortunately we always have the chance with trial and error to resolve dummy "issues" like this :D

Thanks for once again.

Offline Andrej08

  • Single posting newcomer
  • *
  • Posts: 7
Re: TDM-GCC 4.5.0 32- and 64-bit editions released
« Reply #29 on: June 13, 2010, 08:14:08 pm »
Thanks a bunch, TDragon!

I've just compiled wxWidgets & CB 30 mins ago, with no issues. Good job on TDM!