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.
Login to reply
Replies (24)
Have you tried GitHub codespaces?
Give cursor a try, it will read the errors and will run shell commands to fix things
I haven’t. I’ll give it a try now. Thanks
Let me have a bash at that and see. Thanks.
Ahaa, it’s an ai driven ide. I’m trying to learn C++, and I find too heavy dependence on ai stunts my learning. I prefer the painful task of asking an ai manually external to the ide. I must love pain lol 😂
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
Add that to the already painful task to learn C++ 😅
Are you at least using an extension similar to this in your vscode?
https://marketplace.visualstudio.com/items?itemName=bleastProgram.CPP-Compiler
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
When the build process gets complicated you can use https://cmake.org/
You're learning C++ for bitcoin core?
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.
Thanks for the link. I actually have it installed in VSCode, but disabled it so I could focus on the hard work of getting to know the inner workings of C the hard way lol
For building things, please don't build it with C++ 🙏
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.
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.
I heard it was a rough experience as well?! But I guess moving from C++ to Rust was an easy transition as opposed to not knowing C and going straight to Rust?
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.
Hmm 🤔
That’s interesting. I’ll maybe give it a try o after this cycle.
Thanks for that perspective
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.
Definitely ❤️
I’m hoping to start something full time after summer, so will keep you posted.
I saw this and thought you would appreciate the humour lol
https://youtube.com/shorts/k4F2V_BXMlI
This is hilarious 😂