Hacker News new | past | comments | ask | show | jobs | submit login

What’s your preferred dependency management strategy?



I know this is a bit of a loaded question in the C/C++ world. But really depends on the project. Most cases it seems I go with CMake just because that's what everybody seems to use most of the time. But I do long for the day that modules get fully implemented in all compilers and we get some kind of standardized solution that's akin to Cargo/npm/maven... One day. I try my best to keep things simple.


vcpkg is fantastic if all your dependencies are already in there, and still good if you need to add your own ports overlay.


I ended up adopting vcpkg because I started using restinio and the examples all used vcpkg to fetch their dependencies.

It was pretty painless to set up on multiple Linux machines, but both times I've tried on Windows, it's been incredibly painful where I've had to walk through each dependency manually, installing each package manually specifying x64-windows in the triplet, and having different CMake errors on each machine.

This surprised me as vcpkg is actually a Microsoft invention, and seems to be widely praised for reducing configuration woes.

I got things set up and working eventually, at which point I could forget about it, but I definitely plan to get rid of CMake from my build process when I have some time.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: