Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiling gcc 4.7 on windows

Tags:

c++

gcc

I've found I think very good tutorial on how to compile gcc on windows http://www.aristeia.com/Misc/gcc4ForWindows.html#buildinggcc
but I'm stuck on the (surprise, surprise) main point of it, which is building actual gcc. Just to make your life easier, I'm struck here:

configuring:
   # ../../source/gcc-4.1.1/configure --prefix=/mingw --host=mingw32
   --target=mingw32 --program-prefix="" --with-as=/mingw/bin/as.exe
   --with-ld=/mingw/bin/ld.exe --with-gcc --with-gnu-ld --with-gnu-as
   --enable-threads --disable-nls --enable-languages=c,c++
   --disable-win32-registry --disable-shared --without-x --enable-interpreter
   --enable-hash-synchronization --enable-libstdcxx-debug  

The problem is that nothing's happening after I type this, so obviously I must have done something wrong. Any ideas?

Edit, that is my folders' structure:

/gcc-work/source/gcc
$ ls
ABOUT-NLS           boehm-gc      depcomp    libjava       lto-plugin
COPYING             config        include    libmudflap    lt~obsolete.m4
COPYING.RUNTIME     config-ml.in  intl       libquadmath   move-if-change
ChangeLog           config.rpath  libgomp    libstdc++-v3  zlib
ChangeLog.tree-ssa  configure.ac  libiberty  libtool.m4
Makefile.in         contrib       libitm     ltmain.sh
like image 799
smallB Avatar asked Nov 19 '11 10:11

smallB


2 Answers

Honestly, if I were you I wouldn't go through all that headache!

The most up to date website that offers Mingw with latest gcc version I have found is: http://www.equation.com. Go to their programming tools page, and grab the latest version of gcc. They offer both the latest weekly snapshot and the latest official version.

like image 63
Khaled Alshaya Avatar answered Sep 29 '22 07:09

Khaled Alshaya


If compiling a GCC 4.7 (which has not yet being released!) you probably don't have source/gcc-4.1.1/configure which suggest a path for a GCC 4.1.1. So put the right path (to the topmost configure of your GCC source tree).

like image 20
Basile Starynkevitch Avatar answered Sep 29 '22 07:09

Basile Starynkevitch