how to make dependency management as comfy as on Go or Rust in C/C++? i just can't live without Go's auto importing and adding dependencies by repo link
how to make dependency management as comfy as on Go or Rust in C/C++? i just can't live without Go's auto importing and adding dependencies by repo link
go back
Do you forge your own kitchen utensils on an anvil in your back yard as well?
If you are too stupid to download a library, link it with gcc, and type #include <naggerlicious/unnecessary_abstraction_bloat.hpp> then that is your fault
>#include <naggerlicious/unnecessary_abstraction_bloat.hpp>
That would not work. You would need quotation marks.
Works on my machine
Wait don't tell me you've been putting your libraries in your project directories
Of course I do, how else are you going to bundle the dependencies? C has no package managers
Your machine does not change the way how include directive works.
ahahahahahahahahahahahahaha
Are you out of arguments?
kill yourself nagger
C has package manager.
It seems your package manager is damaged or CUNT (computer user noy technical)
>C has package manager.
Yes billions of package managers and none of them work.
really
Works in my machine
It doesn't on mine.
Sent from my Windows™ 11 Surface Pro 9
Not working on my machine bro
Do cniles in this board never do anything beyond shitty fizzbuzz or what
you proved his point, beautiful
except in the real world it is never that easy
t. nocodes
Heavy irony in this post
what part of using a system package manager, using an include directive, and using gcc flags is not making it through your thick skull?
See
it’s pretty obvious that you are not familiar with app/library deployment.
the whole point of package managers is application and library deployment, you goon.
You need the v2.1 version of a niche library but only opensuse, arch and gentoo have it while others are stuck with 2.0. Even worse debian and freebsd are still on 1.23 and aren't gonna be update any time soon.
Now what?
i install multiple versions of the same library differentiated by their version number, like anyone else. do you actually think this is a problem?
>i install multiple versions of the same library differentiated by their version number
multiple versions are not in the repo most of the time. Stop your mental gymnastics.
i'm not the one that just moved the goal posts. rethink using package managers instead of contributing to the balkanization of managing dependencies a la python's fucked ecosystem.
lack of package management does not solve micro dependency problem at all.
>rethink using package managers
Cool, now we have ANOTHER mostly useless package manager competing with conan, vcpkg and whatever else.
i don't know what the fuck those are, but they aren't your system's package manager
If you don't know what they are you don't get to voice your opinion about package management.
don't blame me when you use nonstandard shitty tools and have a shitty time
NTA but that's the problem. There IS no standard tool
virtually every *nix system has dpkg.
>every *nix system has dpkg.
Interesting opinion but that doesn't work on rpm based distros. Does not work on mac os or *BSD.
Hmm, let me gues what you are gonna say
>mac os/freebsd is not a nix
lmao cniles are terminally braindead
>cniles are terminally braindead
Wrong target, cniles are already aware of the problem and pissing in package waggies cornflakes by throwing everything in a 3rd_party folder without giving a shit about what the system already have.
>nonstandard
Alright which one is THE standard between apt, rpm, zypper, pacman, portage, pkg, nix and so on. Which one is the correct one and how do you make everyone agree to stick with one and only one?
it's not hard to support multiple system package managers
Is that why debian and fedora are sharing packages? Oh lol no they don't back to waiting for an update or doing it yourself.
Why are you lying? Package managers don't even agree on the fucking package format, let alone naming conventions and build formats.
It is unless your library is a gigantic piece of dogshit
>n-nooo its the libraries fault!!!1!
COPE
yes your library not being easy to work with is indeed its fault
Stop depending on things
You can't. C/++ was created before web based git hosting was a thing.
C/++ is perfect the way it is, a legacy language for maintaining legacy products. It needs no QoL improvements as standard package format.
use zig
meme
Unironically this.
>fork C/C++ projects
>add a build.zig to the repo
>new projects just declare git repos to fetch and build dependencies
Zig is now your C/C++ package manager.
why can't zoomers grok system package management tools? why do they have to reinvent the wheel over and over again, only shittier?
System package management tools are not portable.
vcpkg
Is n’t this what conan is supposed to be? Never used it. I still prefer manual package/library management.
making dependency management 'simpler' has been a disaster for the human race
>-L <libname>
>#include <lib.h>
wow that was hard. Go and Rust trannies seethe at basically anything these days.
apparently it was hard, because you didnt even do it correctly
Here are a few options
>git subtree
I do this regularly, but only for shit that I know is solid.
>cmake FetchContent or ExternalProject
Actually deterministic, but I find it naggerlicious.
The problem with this bullshit is that you are reintroducing the exact problem that shared libraries solve and essentially reinventing static linking with extra steps.
There are an obscene number of vulnerabilities that result from out of date dependencies and it's not such a big deal when it is only one or two but it becomes a heaven for n-day exploiters when it becomes more than that.
There is literally nothing wrong with using pkg-config to link libraries from your host system. It's how it is all designed to work. And your distritbutions handle security updates for you, so you never have to recompile your program to get them.
So, has everybody forgotten about modules from C++20? What happened? Another failure of the design-by-comittee model? Is it time to accept that WG21 must die?
Modules arent quite fully implemented in many compilers yet
Yes, that's the point. It has been 3 years already and compilers are barely making any progress. It is looking like yet another dead on arrival, unimplementable feature added by the committee.
Bitbake?
I like the current system of header files. I know that C++ will support modules. I don't think I'll migrate at this point. If you cant into header files you probably shouldn't be programming
Use Nix.
git submodule add https://github.com/JustasMasiulis/xorstr
then include file in visual studio. rust/golang retards can leave
>cnile retard reinvents package management
>svn, mercurial, fossil and plain .tar.zg gets in your path
GITCHUDS IN SHAMBLE
this is the only way
>doesn't work on hg and tarballs
>the only way
Grim
I've been using Meson for last 4 years and it just works. Writing the build scripts for it is just easy.
https://mesonbuild.com/Wrap-dependency-system-manual.html
If the git repo has meson build script itself, you just add wrap file into subprojects/<name>.wrap
[wrap-git]
url = https://github.com/libfoobar/libfoobar.git
revision = head
depth = 1
You can provide patches, in switch you can write your own build script for the dependency.
There is also maintained official database of such wrap files and patches that you can add by name in one command.
https://mesonbuild.com/Wrapdb-projects.html
And it's also easy to add packages through pkg-config.
Allegedly it can somehow work with CMake, but it's usually easier to rewrite someone's build in meson than dealing with CMake.
it's also ok as a build tool.
I can make a tool for that
and u retards still responding to him
for me it's git + pkg-config + autotools.
>autotools
It's so terrible cmake sound like a good idea.
cniles got stockholm-syndrome from being c/c++'s battered wife for so long they are not just uninterested in improvements in the ecosystem they are straight-up hostile to it like a wife whos protecting his alcoholic husband. "o-o-oh these marks, nothing happened, i just fell from the stairs". websites where you can download c/c++ compiler's should have a mindbreak tag added to them
Imagine getting filtered by make install
>make install
>fails because package not found
>package version does not match with repo
cniles in shamble
>package version does not match with repo
Never happened.
And if it happened on windows it's because you don't have the right tools.
And if it happened with msys and winget it's because it's shit.
And if it happened on mac you're gay.
And if it happened on *bsd it's because it's too niche.
And if it happened on debian...YOU'RE DOING IT WRONG
just werks™ btw
Works on my pc
CMake + its FetchContent/ExternalProject
works on my machine
it doesn't work on mine either...
sounds like a (you) problem
you meant to write:
"C/C++ sucks because it has no dependency management like this obscure language that i was forced to learn"
...but you thought you were smart
stop depending on things you fucking idiot... if you could read you would know about licenses and you would already have stopped to depend on things...
have you ever heard of "moving targets"? you fucking retard? how much experience do you have anyway? you idiot?
C/++ are obscure languages themselves.
>stop depending on things you fucking idiot...
Pretty much every piece of software today depends on code written by someone else you smoothbrain.
this is your brain on webdev
did you write the standard lib?
did you write your own compiler?
did you write the microcode for the CPU?
no? Then piss off m8.
i like how you put the microcode thing in there because you can't be certain about the first two
but i agree with your general point
>i like how you put the microcode thing in there because you can't be certain about the first two
Are you implying that guy wrote libc/glibc? lmao
i'm not implying anything except that C programmers having small personal implementations of libc and/or common utils isn't so uncommon that you would never meet someone on LULZ who works like that
He's not wrong.
That's precisely why I like C and hate all modern webshits "import is_even" dependency hell that can break from one day to the next because every retard is pulling the latest version from some literally whos hobby repo on github who pushes random fixes every day to keep up his github score.
Libraries should be standalone and self contained.
If it requires more than unzip the source, add to my src/third_party/ folder, add files to _my_ build script, I'm not using that garbage.
Anything that proliferates easy use of nested dependencies are cancer.
What have you written in C?
pkg-config is objectively the best package/dependency system there is.
Every other language-specific package manager is trash tier bad.
I made my own build system and package manager that works like cargo, but for c and c++. I have used it for years for my own projects.
how about you share it?
3 years later and state of modules is meme tier
first time hearing
Soon...
https://en.cppreference.com/w/cpp/language/modules
how good is xmake.io?