You are not logged in.

#1 2024-06-08 14:49:47

Woinishh
Member
Registered: 2024-06-07
Posts: 8

Setting up c++ coding...

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

#2 2024-06-08 14:51:44

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,924
Website

Re: Setting up c++ coding...

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

#3 2024-06-08 14:59:49

Woinishh
Member
Registered: 2024-06-07
Posts: 8

Re: Setting up c++ coding...

Trilby wrote:

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 sad

Offline

#4 2024-06-08 15:04:09

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,924
Website

Re: Setting up c++ coding...

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

#5 2024-06-08 16:28:53

AaAaAAaaAAaARCH
Member
Registered: 2024-02-29
Posts: 41

Re: Setting up c++ coding...

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

#6 2024-06-08 17:25:55

EISENFELD
Member
From: Germany
Registered: 2024-03-13
Posts: 19
Website

Re: Setting up c++ coding...

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

#7 2024-06-08 18:56:57

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 12,165
Website

Re: Setting up c++ coding...

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

Board footer

Powered by FluxBB