Has anyone here used visual studio code to program c++? I’m stuck on including external libraries. It works when writing the code, it autocompletes and knows it’s there on the screen but when I compile it complains it doesn’t know where the called functions are. I’ve tried everything, including adding a complete file path to the library (libwally) but nope, it’s not happy.

Replies (24)

Mohammed's avatar
Mohammed 4 months ago
Give cursor a try, it will read the errors and will run shell commands to fix things
Either way, I’ve figured it out. It just needed to be told where the library was specifically, and I had to figure out where to tell it. Ironically, it was easier to solve via command line than via VSCode or an IDE
lol 😂 Well, I solved the issue of linking the libraries via vscode and also command line. Ironically, it was easier to fix and understand the fix via bash than it was via the gui. But I learnt a value lesson in the process. And that’s what I want. So far it doesn’t seem that different learning c++. Maybe because I know a few other languages already, so the basics building blocks are there. I just need to remember the minute nuances. The if else if rather than if and elif and so on. But so far I’ve made my first program that generates mnemonic phrase, xpub, xpriv and addresses, so I’m making progress.
Yeah; that was part of my original problem. I had a few c++ plugins installed and it got confusing what was doing what. So I removed them all and figured out which ones I needed and how to use it. So keeping it simple. C/c++ Compile Run, and c/c++ from Microsoft for the code hinting. Better syntax for the colours and that’s it. Try to keep it lean, and only add when needed
That too. I would like to know, and at least be able to, understand the code of the software I’m saying is halal lol 😂. الحكم على الشيء فرع عن تصوره 😉 Plus, I would like to build things that can benefit the ummah as a whole in ways that may be specific to us.
Mohammed's avatar
Mohammed 4 months ago
I think only Luke Dash Jr does this
lol 😂 You really don’t like C++ 😜 Well, so far I’ve learnt Python and bash this year, and have now to learn basic C++ and swift. So let’s see where this path takes me. But I do want to make some software for some hardware , and I assume C++ is really good for efficiency when dealing with small hardware with limited resources. I know you might suggest Rust 😂. Let me think about rust.
Mohammed's avatar
Mohammed 4 months ago
C++ was the first language I learnt and did a good deal of development using it. You can say I've been traumatized 🤣 Rust on the other hand can achieve the same efficiency as C++ but safer and with more pleasurable experience.
Mohammed's avatar
Mohammed 4 months ago
It uses a different paradigm, especially the tough stuff in C/C++ aren't there in Rust. Learning any imperative language will provide the same background whether it's python or C. Also, learning some functional programming previously also helped since Rust uses a lot of that paradigm.
Mohammed's avatar
Mohammed 4 months ago
If you decide to work on a Rust project, I would love to collaborate. I learnt Rust but never worked on a real world problem using it.