Gautier RSS Reader (using C++) – July 4, 2016 Update

I made an update to the code underlying the release of an RSS reader I had finished in October 2015. After updating to Fedora 24 Workstation, I had GCC 6.1 and Clang 3.8 to compile C++ and C code. I was intrigued by the fact that GCC 6.1 defaults to the C++14 Standard. It had been months since I last touched this code I had posted on Github. I had a geographic shift to deal with that meant fewer hours to look at this. Yet, it was 4th of July weekend and I was curious about the process of ensuring the code could compile under the C++14 and C11 standards.

The RSS Reader in October 2015

If you read the post titled, “Gautier RSS App Technology“, you saw a screen as shown below. This was the last version of the RSS Reader I had finished in October 2015. Most of it was written in C++ compiled according to the C++11 Standard. The program used FLTK to produce the screens, LibXml2 to parse XML data, and SQLite3 to store data about downloaded RSS feeds for offline use. The integration of SQLite and LibXml2 used a combination of programming styles associated with C++ 11 and C++ 98 Standards and the C Programming Language. The end result is fast, lean, practical, and efficient.

Gautier RSS Reader written in C++ using the FLTK toolkit
Gautier RSS Reader – October 2015

Updated Makefile

The first thing to look at was the Makefile to see what kind of changes need to be made. Good thing too as the Makefile was hard set to C++11. I decided to remove the parts that set the C++ Standard Revision as that will allow the Make process to pickup the current default set by the compiler or in C or CPP Flags. The following is a snapshot of these changes. I had further changes beyond these you can see on Github. For the Clang branch, I decided to keep the Make file hard set to a C++ Standard Revision, but updated to C++14.


Stage Changed Makefile

After several rounds of testing, I posted the Makefile to Github. The screenshot below is where I copied the Makefile from my working area to the local GIT staging area in preparation for the push to Github. I would later stage other files as I made adjustments to the source code for the program (discussed later below).


Built Executables

Eventually, I had a built program compiled to the C++14 Standard. The updated GCC 6 compiler accepted the original source code without errors but I had a few suggestions in the form of warnings from the new compiler version that I decided to pursue. It took a little time to apply the suggestions, but I thought it worthwhile towards greater quality. I also pulled down newer versions of SQLite3 and LibXml2 source code and rebuilt binary libraries. Previously, I built SQLite as part of the source build for the program, but decided to leverage the pkg-config system this time around to produce a potentially better binary image of SQLite linked into the program. I defined build trees for these dependencies separately under GCC and Clang. I did this the last time around and so I continued this practice as I found it valuable. After I achieved a clean executable with only 1 warning left (the warning was for FLTK) under GCC, I decided to address the suggestions emitted from Clang. The result was a much better executable.


GitHub Post

All the updates are on Github @ Although I work with a lot of Microsoft technology and produce good results with that platform, I think this process is far better. Reasons include: substantially faster setup of code writing tools and infrastructure. Greater flexibility and ability to adjust environment to better fit the end result. Less administrative issues in sustaining a core coding process. It is not as glitzy, but it does delivery in a very consistent way with a much lower barrier from setup to end result.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.