Hacker News new | ask | show | jobs
by Sakos 1248 days ago
This is sort of unrelated, but that reminds me that one of my biggest issues with learning C++ was how I was expected to deal with libraries (particularly on Linux, where conventions will even differ between distros) and building the project. Most guides or what have you sort of teach you how to compile a file or two, but you quickly run into issues that are difficult to solve for a complete beginner without a direct source of feedback.
2 comments

Every time I've tried to dabble in C++ I've had the same horrible experience.

I end up "Randomly" stabbing at things until it works just well enough to get that particular thing done then dropping it all because it was such a painful experience.

Compared to something like cargo which works really well, C++ and it's build tools just feel flaky.

It may be that I'm just missing a mental model to get to grips with it, but no other major programming language is like that from my experience.

Same here and I'm dreading starting back up again. Are there any Gradle /npm like package managers that might simplify this?

Looking for something that is still alive in 2023

Same here and I am dreading starting back up again. Are there any Gradle /npm like package managers that might simplify this?

Looking for something that is still alive in 2023

Conan works pretty well. There is also vcpkg, but I haven't used it. But are current and maintained.
Will check them out
In Behavioral Science this phenomenon is called "learned helplessness". The rabbit will not flee the cage even with the door propped open and no one around.

Theon Greyjoy in "Game of Thrones" exhibited this condition.

It is a thing to overcome.

I agree, it’s so horrible. Passing flags to a compiler for some Byzantine rule just to change lord knows what, but it all works now.

What on earth.

I wish somebody would write a book. Even an online book. An all-encompassing book just about how to link/build C++ projects and all the different solutions people use and how they work in practice. Common ways to organize and configure C++ project builds. How Linux distros each differ in where libraries are stored and how to find and link them. Common issues and how to fix them. But it also needs to convey how all these things work and help you create a mental model that allows you to also find your own solutions.