How to set up GCC 4.5.x?

Community Forums/General Help/How to set up GCC 4.5.x?

Grisu(Posted 2010) [#1]
Hi everyone!

Can someone please give me a small guide on how to set this up under Windows 7 to work with bmx?

Thanks in advance.
Grisu


xlsior(Posted 2010) [#2]
This is what I did.. (Running Windows 7, x64... Use at your own risk, yaddah yaddah yaddah)

- Back up existing MinGW install

- Go to this site: http://tdm-gcc.tdragon.net/download
downloaded the win32 sjlj release (direct link: http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm-gcc-4.5.0.exe/download

- run the installer, and pick a version (c/c++ should do, don't select the dw2 release)

- from the installation mingw\bin folder, copy ar.exe and ld.exe to your blitzmax\bin folder (back up the existing ones first of course)

- Back up Blitzmax\lib, and overwrite the existing files with their copies from your new mingw\lib folder with the same names

- Make sure that your new MinGW install is added to the path, just like the 'standard' MinGW install would be.

- After you set everthing up properly, the MaxIDE should now show GCC version 4.5 in the MaxIDE 'about' screen. (You can also check this by running gcc -v from a command prompt)

- Rebuild all modules, or you may run into unexpected issues...
blitzmax\bin\bmk makemods -a *
blitzmax\bin\bmk makemods -a -h *


Grisu(Posted 2010) [#3]
Thanks for the fast reply. Works!

I even get a lower memory usage on my app?!



Grisu(Posted 2010) [#4]
Sidenote:
Upx won't work with MinGW 4.5.0 built executables.
You get an error: 'CantPackException: TLS callbacks are not supported' error.


ShadowTurtle(Posted 2010) [#5]
by the way..

There are good packers like upx? It can be commercial.. (but please not over 9000 ..)


Grisu(Posted 2010) [#6]
Update: GCC 4.5.1 is here... :)

@ShadowTurtle:
If I got your question right:
UPX is free and I don't know of any other good exectuable packers.
For other stuff you can use a zip module.


TWH(Posted 2010) [#7]
If anyone has other problems with setup, this might be useful:

I downloaded 4.5.1 TDM and got the following complaints when doing "bmk makemods -a"

1. gcc complained about "gcc createprocess"
Copying mingw\libexec\gcc\mingw32\4.5.1\" into "MinGW\bin" solved this.

2. When compiling modules it stopped on the missing files stddef, cstdarg and c++config.

Solved this by searching for the files. Found them in
MinGW\lib\gcc\mingw32\4.5.1
and then copied them to MinGW\include

I don't know if this is correct... But rebuilding all modules now works, and my bmx programs seem to work fine.


Grisu(Posted 2011) [#8]
GCC 4.5.2 was released:
http://tdm-gcc.tdragon.net/download