Post AamFgMsFRXfTgTCXR2 by russjr08@mastodon.russ.network
 (DIR) More posts by russjr08@mastodon.russ.network
 (DIR) Post #Aam2gN7JF1EB27ux3g by atlas@thonkbox.rightmouse.click
       2023-10-14T21:02:33.499205Z
       
       0 likes, 0 repeats
       
       I can't fucking figure out C++ libraries please send help
       
 (DIR) Post #Aam2gNuwGUvVW38aPo by atlas@thonkbox.rightmouse.click
       2023-10-14T21:52:48.893413Z
       
       0 likes, 0 repeats
       
       Okay so I understand C/C++'s syntax, use case in modern times, and the basic tools to use it (Makefile, GCC/Clang/MSBuild, GDB/LLDB, libstdc++/libc++/MSVC, clangd/intellisense).I understand that system packages add files and stuff to the /lib/ directory, and compilers will then fetch libraries there to implement in the program I'm working on.Fucking Conan or properly implementing OTHER libraries into this code though, no goddamn idea.
       
 (DIR) Post #Aam2gOll67B49rqlkG by jeff@misinformation.wikileaks2.org
       2023-10-14T21:54:27.019643Z
       
       0 likes, 0 repeats
       
       @atlas learn your linker. basically libraries are huge piles of .o files concatenated together into giant balls of shit. resolution order of which balls of shit to look for and where is done by your linker, and every linker does it differently.
       
 (DIR) Post #AamB3jwNLgki75SP8S by russjr08@mastodon.russ.network
       2023-10-14T23:23:28Z
       
       0 likes, 0 repeats
       
       @atlas I have very little C[++] experience but I do know with most compilers you can also specify a custom library path, like `-L/home/dev/openssl/lib` (add a search path for libraries) and then add `-lopenssl` (add the library)Zero clue about Conan though, I didn't even know it was a thing until now lmao
       
 (DIR) Post #AamB3kpK3OhkrVAHmS by atlas@thonkbox.rightmouse.click
       2023-10-14T23:26:36.568600Z
       
       0 likes, 0 repeats
       
       @russjr08 For established libraries, that is fairly simple to figure out, and that could very well be as simple as that, but take this thing for example: https://github.com/rg3/libbcryptIt's all raw C (not even C++, just to make it one step more complicated), and while I figured out how to import the headers to make the code compatible, I could not get a functional compiled result with all the files. It doesn't help that I don't exactly understand the boilerplate makefile that I had gotten for my project.
       
 (DIR) Post #AamB3lXdOe9N4vtfqi by jeff@misinformation.wikileaks2.org
       2023-10-14T23:28:18.733307Z
       
       0 likes, 0 repeats
       
       @atlas @russjr08 conan gives you some cmake jizzcruft shims to wire up the shitballs it makes into your cmake build system
       
 (DIR) Post #AamFgMsFRXfTgTCXR2 by russjr08@mastodon.russ.network
       2023-10-15T00:08:30Z
       
       0 likes, 0 repeats
       
       @jeff @atlas Interesting, I never got much of a chance to play around with cmake except for when I made a very brief hello world in CLion at one point lol
       
 (DIR) Post #AamFgNng01baYa4Owq by jeff@misinformation.wikileaks2.org
       2023-10-15T00:20:07.109342Z
       
       0 likes, 0 repeats
       
       @russjr08 @atlas cmake is not something to halfass. if you learn it good it's fuggin amazeballs
       
 (DIR) Post #AamHPhJyMrXG5LLdSK by atlas@thonkbox.rightmouse.click
       2023-10-15T00:21:48.564092Z
       
       0 likes, 0 repeats
       
       @jeff @russjr08 I guess as far as I know now, Makefile is basically a souped up scripting language hellbent on compiling stuff. CMake basically takes care of all of that for you so you don't have to script much of anything, as it figures that out.As far as I can tell, again, I may be very wrong.
       
 (DIR) Post #AamHPi9jGQw4frYy80 by jeff@misinformation.wikileaks2.org
       2023-10-15T00:39:31.484584Z
       
       0 likes, 0 repeats
       
       @atlas @russjr08 makefile is a less portable shellscript tbh
       
 (DIR) Post #AamHULdQQMDiH4fElE by russjr08@mastodon.russ.network
       2023-10-15T00:25:31Z
       
       0 likes, 0 repeats
       
       @atlas @jeff That's as far as I understand it, with CMake being more capable of "Hey, I made this library, here's something you can include to CMake so that the library is included for you" rather than you having to explicitly modify your whole Makefile to work around it... I think, at least
       
 (DIR) Post #AamHUMqDwG3I13eyLg by jeff@misinformation.wikileaks2.org
       2023-10-15T00:40:21.651488Z
       
       0 likes, 0 repeats
       
       @russjr08 @atlas treat cmake like a programming language rather than a shellscript
       
 (DIR) Post #AamV5bdTCBJ01CmVOK by EricZhang456@stereophonic.space
       2023-10-15T03:12:49.446517Z
       
       0 likes, 0 repeats
       
       @atlas isn’t it just #include?