網(wǎng)站開發(fā)用什么數(shù)據(jù)庫一鍵優(yōu)化軟件
ubuntu24.04, vscode 配置文件 C++ 的環(huán)境
下載的gcc,使用命令為
sudo aptitude update
sudo aptitude install build-essential -f- `sudo`: 以超級用戶權限運行命令。
- `aptitude`: 包管理工具,用于安裝、更新和刪除軟件包。
- `install`: 安裝指定的軟件包。
- `build-essential`: 一個包含編譯軟件所需基本工具的元包,包括 `gcc`、`g++`、`make` 等。
- `-f`: 嘗試修復系統(tǒng)中存在的依賴關系問題。
note:這里在學習C++的GUI一塊時,需要下載FTLK,但一直不能順利下載成功,原因是我下載了gcc相關的package產(chǎn)生沖突,所以重裝系統(tǒng)后使用了這種統(tǒng)一的命令安裝。
默認下載在文件/usr/bin/g++
編譯文件
task.json
{ //https://code.visualstudio.com/docs/cpp/config-linux"tasks": [{"type": "cppbuild","label": "C/C++: gcc build active file","command": "/usr/bin/g++","args": ["-fdiagnostics-color=always","-g","${file}","-o","${fileDirname}/${fileBasenameNoExtension}"],"options": {"cwd": "${fileDirname}"},"problemMatcher": ["$gcc"],"group": "build","detail": "Task generated by Debugger."}]
}
調(diào)試文件
launch.json
{// Use IntelliSense to learn about possible attributes.// Hover to view descriptions of existing attributes.// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387"version": "0.2.0","configurations": [{"name": "(gdb) Attach","type": "cppdbg","request": "launch","program": "${fileDirname}/${fileBasenameNoExtension}","args": [],"stopAtEntry": false,"cwd": "${workspaceFolder}","environment": [],"externalConsole": false,"MIMode": "gdb","setupCommands": [{"description": "Enable pretty-printing for gdb","text": "-enable-pretty-printing","ignoreFailures": true},{"description": "Set Disassembly Flavor to Intel","text": "-gdb-set disassembly-flavor intel","ignoreFailures": true}]},],}