You are not logged in.
Hello, I am using VSCodium to learn c++ but can't find a way to compile and run a program. I have downloaded GCC but that's about it.
Could someone point me to some resources or help me?
Offline
What do you mean you cant find a way? Are you looking for some button to push in VSCodium to make it magically happen?
If you want to compile a single program, you just use the `g++` command (with proper flags). For a more complex project you can write a makefile then literally just type `make`. Optionally you could also learn more complex build systems like cmake or ninja which seem popular for c++ projects - though personally I'd strongly advise getting used to the basics first.
Last edited by Trilby (2024-06-08 21:04:20)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
What do you mean you cant find a way? Are you looking for some button to push in VSCodium to make it magically happen?
If you want to compile a single program, you literally just use the `g++` command (with proper flags). For a more complex project you can write a makefile then literally just type `make`. Optionally you could also learn more complex build systems like cmake or ninja which seem popular for c++ projects - though personally I'd strongly advise getting used to the basics first.
Yes I'd love that kind of a button xD
Could you explain how to compile and run a program? I'm super new so I don't know how to
Offline
If you want to do so with a button in VSCodium, then no I can't. I'm pretty sure it has the ability to do so, but I have absolutely no experience with that kind of IDE/Editor. And if this is your intent for this thread, you may want to add VSCodium or VSCode to your title.
If you're doing it from the command line, I already answered that. You can read `man gcc` to learn more (or ask a more specific question).
Last edited by Trilby (2024-06-08 21:05:41)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Considering your starting point, I would suggest to look at some youtube videos that will help you though the setup process.
But if you prefer a text based approach
1. install gcc https://wiki.archlinux.org/title/GNU_Co … Collection
2. use the vscode guide since the programs are the same https://code.visualstudio.com/docs/cpp/config-linux
Offline
If you change this in your settings.json, you have access to the VS Code Marketplace. There are several plugins for C++ (The ones from Microsuck are not that bad). 'C++ code runner' is something you can also search at the marketplace.
"extensions.gallery": {
"serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
"cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
"itemUrl": "https://marketplace.visualstudio.com/items"
}
Ich weiß, dass ich nichts weiß !
Offline
Mod note: moving to AUR Issues.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline