Boost Binaries for MinGW - c++

Are there precompiled Boost binaries for MinGW? I've tried compiling them on my own and I've encountered way too much difficulty, and at this point I'm pretty sure I've broken something vital to Windows and I'm going to figure out what two months down the road. So does anybody know where I can get a precompiled boost library to use? If not, I think I'll just wait until std::thread becomes available on MinGW.

Fedora Linux 16 have them, but compiled with GCC 4.6 (C++ libraries aren't compatible between major compiler versions, Fedora 13 had Boost for GCC 4.4, Fedora 15 has for GCC4.5):
DLLs for: GCC 4.6 GCC 4.5 GCC 4.4
Static for: GCC 4.6 GCC 4.5 GCC 4.4
A free (as in freedom) program — 7-zip — can open this RPM packages on Windows.
It is much easier to cross compile for Windows with MinGW32 on Fedora than to compile with MinGW+MSYS on Windows. Often it is as easy as ./configure --host=i686-pc-mingw32 && make if you have mingw32-* packages installed with distribution's package manager.
A list of available packages for Fedora is here — search for mingw32. There are compiled C and/or C++ libraries for technologies like SDL, Curl, GTK+ with Glib and Glade, Iconv, JPEG, Ogg-Vorbis, SQLite, ZIP, SSL, PCRE, Qt, Readline, Zlib and many more.

It seems a lot of folks have issues with MinGW and Windows when it comes to Boost. I found a great 'how-to' that helped me setup the Eclipse CDT with MinGW and Boost. Worked like a charm, no issues!
How to setup MinGW, Eclipse CDT and Boost
Hope that helps. It covers both Cygwin and MinGW. I used MinGW and now I am making cross platform code in Eclipse. I am also using QMake from the Qt libraries to manage my Makefiles across the multiple platforms. Talk about comfort!

Last week I had a need for the Boost libraries in MinGW. I couldn't find any binaries, but after some very painful debugging I managed to get them compiled myself. I eventually scrapped them and switched to Visual Studio, but I was able to pull the binaries out of my recycling bin for you (compiled with GCC 4.6 I believe):
http://daxnitro.com/mingw.zip
Hopefully they'll be useful to you.

Related

MinGW: How to upgrade GCC/G++ to version 5 on Windows?

I have MinGW installed on my computer and I just found out that my GCC/G++ has problems compiling newer C++ standards. So I want to upgrade from 4.8.1-4 to the latest version (5.3 at the time of writing this).
The MinGW Installation Manager doesn't install a newer version than 4.8.1-4, so I'll probably have to do it somewhat manually. But how? I heard that Cygwin might be able to do it, but I think MinGW and Cygwin would interfere with each other (environment variables). So I'd rather not do it that way.
MSYS2 might be a good answer to your needs. It has cygwin-like environment together with mingw3/mingw64 environment. And GCC version is 5.3
Link: https://msys2.github.io/

Install gcc 4.9 on windows and configure it in Netbeans

Preamble
If anything I wrote is not correct, please be so kind and correct me. I am a php developer mainly - I am not into this compiling stuff. I know there are a lot of topics around the www but they seems to be either old/outdated, very complex or links to a bunch of files on sourceforge (I have no clue what files I should download and what to do with them after downloading them).
Searching a couple of days by now
I am researching for a couple of days by now and tried different compilers and settings but I don't get a standalone executable for a c++14 programme.
First compiler
The first compiler I used was cygwin. I was able to compile it with c++14 but on other computers cygwin had to be installed as well as a cygwin dll was missing. I googled and figured out that programmes compiled using Cygwin requires this dll but cannot be included to the programme itself - or did I missed something?
Current compiler
I then switched to MinGW which seems to be a better choice as it allows to compile standalone executables which is correct as I am able to do so. Well, the MinGW setup I downloaded from http://www.mingw.org/ installed among other the gcc version 4.8.1. I need 4.9.1 for c++14.
As the title says I want to configure it in Netbeans but if there is a proper tutorial for a command line compiling it's no problem either but I try to avoid using another IDE as we use it at work, too.
drangon.org
I also heard about http://www.drangon.org/mingw/ but there are tons of links linking to similiar stuff.
My goals
Get a better understanding about gcc and this compiling stuff in general.
Install gcc 4.9.1 (preferred into MinGW as it's currently installed)
Configure it in Netbeans 8.
I suggest you to try MinGW-w64. (Download.)
It's similar to MinGW, but have better multitreading support, can easily compile x64 applications, and what's more important, at this moment it uses GCC 4.9.2.
By the way, MinGW applications require some .dlls to work too. Usually you just provide these libraries with your application, but another option is to add -static flag at linking phase. Applications that are compiled with it do not require any external library files (unless you're using 3rd party libraries that don't support static linking).

RedHat devtoolset - implications for distributing compiled code

I'm running CentOS 6.4 and need a later version of the C++ compiler to build my development tools (Qt Creator in this case).
I'm unclear on the implications of using devtools and I'm hoping someone can explain.
If I compile programs using devtools, does that means the executable will run on other Centos 6.4 installations without change?
Or..do I know have to ship libraries or other files with my compiled programs?
If so...do I have to modify my C++ code to reference the later libraries? or is this something done by the person installing my compiled program
I hope this somewhat late answer can still help you. What I found is that compiling my project with devtoolset (1.1 in my case, but that should not matter too much) on RHEL 6.4 produces binaries which can almost run on a standard RedHat EL 6.4 (should be similar for Centos 6.4).
The only trouble I ran into was compiling my project with -std=c++11, which produced some problems due to incompatible symbols. The reason is that the GCC folks considered these parts of the standard library to be experimental in GCC 4.4, so they broke ABI compatibility in some places.
Turns out, there's an easy fix: Link your programs with the additional command-line-argument -static-libstdc++. That way, the binary becomes a bit larger but is runs on an unmodified RHEL 6.4 without installing additional libraries/updates for the devtoolset.
To answer your questions explicitly:
Yes, almost.
No.
Don't change the code, just add -static-libstdc++ when linking.

How to build and install GCC on Windows 7, ver. 4.8.1

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

Where can I download GCC 4.3.2 binaries for Windows?

I have to write a c++ program, and i want to do this in vstudio 2010, because it's the most comfortable way for me. But later this code will be compiled in gcc 4.3.2 (ejudge). I can't find gcc 4.3.2 binaries for Windows, if there any ways to check correctness of gcc compilation? Or maybe anyone will help to find gcc binaries? I found this link http://tdm-gcc.tdragon.net/download but there i can't find 4.3.2 version binaries, only source code. Thanks.
MinGW, or Minimalist GNU for Windows, is a set of GNU compilers for Windows platforms. It's the easiest way to use G++ on windows platform. You could also use Cygwin, but it would be a bit of overkill.
As I recall g++ 4.3.2 was used in an older version of the Code::Blocks IDE, as the bundled compiler.
However, I'm currently unable to connect to [http://www.codeblocks.org], so I don't know if they provide downloads of older versions.