| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| pub:software:development:vscodium:cpp:get_started [2026/08/26 05:03] – [VSCodium Configuration] admin | pub:software:development:vscodium:cpp:get_started [2026/08/26 07:49] (current) – [Get started with VSCodium C++] admin |
|---|
| ====== Get started with VSCodium C++ ====== | ====== Get started with C++ and VSCodium ====== |
| This page describes how to get started with C++ development, first using a simple makefile, without a specific editor, then using the same makefile within [[https://vscodium.com/|VSCodium]] with some of its supporting features. | This page describes how to get started with C++ development, first using nothing but a cpp file and a simple makefile, created without a specific editor. Once that works, it continues with describing how to use that same makefile within [[https://vscodium.com/|VSCodium]]. An advantage to use VSCodium is that it offers practical guidance during writing, helping to write code faster. |
| |
| |
| The extension clangd depends on the clangd language server [[https://clangd.llvm.org/|clangd]], which is confusing, since both the language server and the extension have the same name. Before the extension can be used, the language server needs to be installed. To automatically install using the command line, jump to the instruction "... Install C++ extensions from the command line". Otherwise proceed as following to install manually: | The extension clangd depends on the clangd language server [[https://clangd.llvm.org/|clangd]], which is confusing, since both the language server and the extension have the same name. Before the extension can be used, the language server needs to be installed. To automatically install using the command line, jump to the instruction "... Install C++ extensions from the command line". Otherwise proceed as following to install manually: |
| |
| Download clangd-linux-21.1.0.zip from [[https://github.com/clangd/clangd/releases]]. | Download clangd-linux-22.1.6.zip from [[https://github.com/clangd/clangd/releases]]. |
| |
| And extract this to: | And extract this to: |
| |
| $HOME/.config/VSCodium/User/globalStorage/llvm-vs-code-extensions.vscode-clangd/install/21.1.0/clangd_21.1.0/ | $HOME/.config/VSCodium/User/globalStorage/llvm-vs-code-extensions.vscode-clangd/install/22.1.6/clangd_22.1.6/ |
| |
| Then configure the clangd.path in VSCodium to: | Then configure the clangd.path in VSCodium to: |
| |
| $HOME/.config/VSCodium/User/globalStorage/llvm-vs-code-extensions.vscode-clangd/install/21.1.0/clangd_21.1.0/bin/clangd | $HOME/.config/VSCodium/User/globalStorage/llvm-vs-code-extensions.vscode-clangd/install/21.1.6/clangd_22.1.6/bin/clangd |
| |
| ^ //Install/configure clangd language server, titleBarStyle and telemetry with VSCodium automatically//((References: https://ubuntu-mate.community/t/vscode-kills-panel/29174/2)) ^ | ^ //Install/configure clangd language server, titleBarStyle and telemetry with VSCodium automatically//((References: https://ubuntu-mate.community/t/vscode-kills-panel/29174/2)) ^ |
| |
| <columns 100% *100%*> | <columns 100% *100%*> |
| | {{:software:programming:vscodium_project_first_view.png?direct&400|}} | | | {{:pub:software:development:vscodium:cpp:vscodium_project_first_view.png?direct&400|}} | |
| | //VSCodium first screen after opening via command line"// | | | //VSCodium first screen after opening via command line"// | |
| </columns> | </columns> |
| |
| using namespace std; | using namespace std; |
| using fmt::format; // or specifically fmt::v9::format | using namespace fmt; // Note that fmt::format or fmt::print will not work with V10 anymore as it did with v9 |
| using fmt::print; // or specifically fmt::v9::print | |
| |
| int main(int argc, char** argv) | int main(int argc, char** argv) |
| #include <iostream> | #include <iostream> |
| |
| using fmt::print; // or specifically fmt::v9::print | using namespace fmt; // Note that fmt::format or fmt::print will not work with V10 anymore as it did with v9 |
| |
| int main() | int main() |