Pregunta

I would like to upgrade my old GCC compiler to v. 4.8.1.

Currently I'm using Code::Blocks IDE (nightly build, svn 8982), and my compiler is GCC 4.4.1.

I downloaded fresh GCC from their site - gcc.gnu.org

From what I've read in documentation, they say that I should first build compiler by myself. Afterwards, they throw something like this:

% mkdir objdir

% cd objdir

% srcdir/configure [options] [target]

However, I completly have no idea what to do with these lines. And even if I did, afterwards come maaany lines with some additional options, where I am even more lost then before.

I don't know if there is any easy way of installing it, but from what I've read here, I can download MSYS from MinGW and it will do everything(I hope?) for me. However, from what I see there, it says that MinGW comes with already built version of GCC, meaning I won't be able to use mine anyway. Am I right? If yes, what should I do to build and use GCC? If not, then will I be able to easily install GCC after downloading MSYS?

Thanks in advance.

¿Fue útil?

Solución

I can download MSYS from MinGW

YOu can.

and it will do everything(I hope?) for me.

It won't. MSys provides environment for building software that requires unix-like environment. To be more precise - autotools. If you aren't familiar with *nix build process (configure script), Mingw won't really help you.

However, from what I see there, it says that MinGW comes with already built version of GCC,

Yes, version 4.7.2 at the moment.

meaning I won't be able to use mine anyway. Am I right?

No. If you don't add Mingw/MSys to your PATH, you can keep multiple different installations on the same machine. It also SHOULD be possible to use multiple different versions of gcc within the same installation of mingw, but things can get messy here. (gcc3 and gcc4 should be able to exist, not sure about 4.7.2 and 4.8.1)

If yes, what should I do to build and use GCC?

You should search for precompiled binaries provided by somebody else. Compiling gcc yourself is possible, but for you (i.e. if you aren't arleady familiar with msys) it might not be worth the effort.

Either you could try http://mingw-w64.sourceforge.net/ or mingw-nuwen. Mingw provided by nuwen is 32bit only, but is very easy to install. The problem is that standard mingw distribution includes update tool (with "mingw uppdate" and "mingw upgrade" you can upgrade installed packages to their latest version), bug "mingw-nuwen" doesn't have such tool.

Because you say

However, I completly have no idea what to do with these lines.

You should either use precompiled mingw provded by somebody else, or use another compiler. If you don't really need bleeding-edge C++11 support ON WINDOWS, use visual studio express.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top