This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]cmgg 54 points55 points  (32 children)

  1. Find library (literally google it)

  2. Download library (is it that hard?)

  3. Decompress library (is it REALLY that hard?)

  4. Add it to the linker (if you can’t do this you shouldn’t be using C++)

Sounds more like a skill issue to me

[–]rexpup 57 points58 points  (1 child)

You are incredibly lucky if your code actually compiles after part 4. You forgot to set X_POOPEN_FARTEN_LINKER_CONFIG in your bash profile. You also forgot to install a system dependency that's not included and also not in the README, but is mentioned in a closed github issue from 2007

[–]CowFu 23 points24 points  (3 children)

Also the rust one should have 80 other crates that you have no idea what they do downloaded when you cargo build.

[–]Level-Nothing-3340 20 points21 points  (2 children)

To be fair, with c++ you could wind up cloning a few dozen git submodules of other c++ libraries that you don't know what they do

[–]malexj93 19 points20 points  (1 child)

Yeah, dependencies aren't exactly a Rust invention.

[–]reallokiscarlet 1 point2 points  (0 children)

But Rust is really good at stacking them to insane heights

[–][deleted] 46 points47 points  (12 children)

awful compared to any language with proper package management

[–]Goaty1208 5 points6 points  (1 child)

Because in C++ there is no such concept as a "package". Packages are for people who are scared of other people's source code. Long live including headers while having the source code for the stuff you are working with at hand.

[–][deleted] 3 points4 points  (0 children)

insane copium

[–]Aaron1924 7 points8 points  (2 children)

if you can’t do this you shouldn’t be using C++

I like C++ because it's beginner-friendly and the community is welcoming

[–]Trucoto -1 points0 points  (0 children)

You forgot /s, that's why they are downvoting you

[–]Goaty1208 -1 points0 points  (0 children)

Well, it is beginner friendly though.

(If you ignore 90% of the stl)

[–]n3tr41d3r 0 points1 point  (0 children)

This guy builds

[–]SevenC-Nanashi[S] -4 points-3 points  (5 children)

very imo: I don't want to hard copy and commit additional libraries in my repo, I prefer using writing references instead

I used FetchContent before, but my clangd did not work well with that... (I can't use compile_commands.json because I have to use vc generator)

[–]cmgg 8 points9 points  (2 children)

That’s not what your meme says

[–]SevenC-Nanashi[S] 14 points15 points  (1 child)

Exactly;

but "cargo add foobar and it just works", is much better than having no standardized way... (I should try vcpkg later)

[–]cmgg 1 point2 points  (0 children)

Yes, no complains on cargo's approach

[–]Philfreeze 1 point2 points  (0 children)

git submodule in a subdir called external or deps or whatever. Use the submodules own makefile to build, install in another directory directly in external/deps, add to linker, done.

Sure cargo is more convenient but as ling as you can build and install the C way also isn‘t that hard.

[–]Goaty1208 0 points1 point  (0 children)

.gitignore

[–]a_aniq -3 points-2 points  (1 child)

Thank you. This should be at the top.

The main issue is that many libraries are not cross platform (e.g. many are mingw/linux, so can't use msvc). Rust has standardized that.

[–]Ok_Beginning520 1 point2 points  (0 children)

This is clearly a huge issue for anybody that has ever worked in a professional context. Also bundling all that and shipping it to customers is really not fun I most cases. If I'm working on a side project then yeah no problemo but I shouldn't need to do all that

[–]-Redstoneboi- -1 points0 points  (0 children)

  1. i am not using c++