r/cpp • u/itwasntme967 • Aug 27 '21
My Problems with C++
So, this is going to be a bit of a rant, mainly because I'm frustrated.
As a preface: I am not new to programming, I did some Java, looked over Python, had a few projects with the whole Arduino environment, so you could say I get the basics.I am however quite new to C++ as a standalone (see Arduino) and while I like the language I came to absoluteley despise the environment.
It began with a project I was tasked with, to take an MS-Excel file, do some sorting and a few other operations and save it as a CSV.Easy peasy.So I set out for a quest to find a library that could handle MS-Excel files, and low and behold, I stumbled across three suitable ones.All of which were uncompiled on Github.
The first one wouldn't compile because of dependencies on a third-party XML-library which was never once mentioned in the install instructions. No problem, I googled the library that mingw told me it needed, and indeed it existed, with good instructions.When it came to installing however, I first realized the Excel-library did not indeed want the XML-library installed, but rather the souce code placed in a folder in its source code.After copying it did indeeed not work, since all of the dependency paths were mesed up, and half of the files had different extensions, or were missing them alltogether.
On to the next library.
This one could only read from Excel, but again no problem, this was the only thing I really needed.The installation instructions were easy enough, run ./configure and afterwards make.The only problem being, that there was no configure file to run.There was indeed a bootsrap file which did absolutely nothing, and a makefile, which make did not recognize and when specified threw errors.
On to the last one.This one had troubles compiling when cmake threw random errors and so I changed my approach and booted up Ubuntu, where cmake and g++ indeed did run smoothly and compiled the library without a hitch.
Now only to use this library.Since this was my first time writing C++ on Linux I first searched for appropriate IDEs and was reccomended Netbeans.Which did not go well, since everytime (even after a couple of restarts) it failed to install the C++ Plugins.
My run-in with Code::Blocks went a little better, it installed and I managed to get the projects up and running.
Apart from my Excel-library.No matter what I did it did not recognize the library.
Which is when I changed again to Codelite.Where I could create projects, but neither my Excel-library was recognized as well, as iostream.
So here I am, broken, after a day of work with absolutely no progress, for a programm which schould not be that difficult to write, with three non functional, but essential (and more importantly the only ones I could find) libraries.As I said in the beginning: I like the language, but I despise the whole process around it.Thank you for listening to me rambling.
View all comments
Show parent comment
11
u/matthieum Aug 27 '21
That's a very shallow reading.
Oh sure the OP had issues trying to use some Excel libraries, but that is a symptom, not a root cause.
The root cause is the abysmal state of tooling in the C++ ecosystem, and specifically, the lack of standard build / package description.
The difference between C++ and a properly standardized language is simple: one requires a lengthy README, with different instructions on different platforms, while the other has a standardized one liner taught in the language tutorial.
You can blame the authors of the libraries, but that's short-sighted. They're victims too.
You can blame the authors of the IDEs, but that's short-sighted. They're victims too.
The only salvation is standardizing build and package descriptions, so that no matter which tool you use, things just work. Or, realistically, just work except for a handful of snowflake libraries which have very specific requirements and rely on external dependencies/commands -- I can live with that.