Friday, February 08, 2013

OpenSSL 1.0.1d and cURL 7.29.0

It happened again, now with OpenSSL and cURL. New versions of these libraries were released. See below how to update them. As with Boost before the next MinGW distro will include the updated OpenSSL and cURL.
Assuming you have installed it in C:\MinGW directory:
  • Clean up the existing cURL files:
cd C:\MinGW
rmdir /s /q include\curl
rmdir /s /q include\openssl
rmdir /s /q ssl
cd C:\MinGW
bin\bsdtar -xvJf curl-7.29.0.tar.xz
bin\bsdtar -xvJf openssl-1.0.1d.tar.xz

Boost C++ Libraries release 1.53.0

The new release (1.53.0) of Boost Libraries was made available on February 4th, just 3 days after I released the Feburary 2013 edition of my MinGW distro that included release 1.52.0. Because of this I have built the new release and I'm making it available here as a separated download. As usual it also includes the ICU versions of both Boost RegEx and Boost Locale libraries. The next release of the MinGW distro will contain this version of Boost (or a newer if released meanwhile).
Assuming you have installed it in C:\MinGW directory:
  • Clean up the existing Boost files:
cd C:\MinGW
rmdir /s /q include\boost
del lib\libboost*.*
cd C:\MinGW
bin\bsdtar -xvJf boost-1.53.0.tar.xz

Friday, February 01, 2013

MinGW Distro - February 2013 Release

By demand the add-on libraries have been included in the main package.

Updates: FreeType 2.4.11, GLEW 1.9.0, ICU 50.1.2, libssh2 1.4.3, libgmp 5.1.0, POCO 1.4.6, SQLite 3.7.15.2, jpeg 9

MinGW-Distro-Addons.exe - 75 Mb - Full with add-ons
SHA1: dbdf784f741efa0c0aa8cb3640bbb4dcbc45b707

MinGW-Distro-Core.exe - 16 Mb - Core Components
SHA1: 97b13f4ce75dc48f536c0c350a35758373125de5

Friday, December 14, 2012

auto overused

I had recently read on an article on a programming subject not related to C++11 but which uses C++11 constructs to explain the point. It is nice to see that C++11 is being adopted this way. However one thing that scared me was the overuse of auto keyword.

const auto MAXSIZE = 10000;

for (auto i = 0; i < MAXSIZE; ++i)
{
...
}

This chills me to the bone. Why not use int or size_t? Of course this simple code doesn't show the complete threat that is the overuse of auto. But this introduces a culture where is OK to use auto everywhere.

My feeling about auto is that it is a tool best fitted for generic programming or where writing the type is difficult, complicated or impossible. Compare this:
std::vector<int> v;

for (std::vector<int>::const_iterator it = v.begin(); it = v.end(); ++v)
{}

with the better:

std::vector<int> v;

for (auto it = v.begin(); it != v.end(); ++v)
{}

but this is even better and clearer:
std::vector<int> v;

for (int &i : v)
{}


Excessive use of auto can lead code that is hard to read and to maintain. Maintenance is all about code reading. Please take care.

Sunday, December 02, 2012

Why another XML parsing library?

Some may have noted that in the December 2012 release of my MinGW Distribution I have included yet another XML parsing library: pugixml. Why this if it already has libxml2?

Well, while libxml2 is a complete, standard-compliant XML parsing library it lacks a DOM interface. With DOM it is easier to handle and to walk through the XML representation.

I have evaluated many simple to use, fast libraries: RapidXML, FastXML, AsmXML. And, of course pugixml. However pugixml is fast, has a good documentation and a DOM-like, modern interface that fits well with STL and C++11 ranged-for and lambdas. That was I was looking for.