安裝C++ Compiler
|  | 
| Microsoft C++ Compiler | 
安裝scoop、xmake ➡️ 教學
|   | 
| vscode 裝上面2個插件 | 
用xmake生成專案
|  | 
| xmake create -t console hello_world | 
用xmake安裝glfw、glm ➡️ 教學
xrepo install glfw
xrepo install glad
設定xmake.lua ➡️ 教學
|  | 
| 是不是比Visual Studio的設定簡單? | 
生成compile_commands
|  | 
| xmake project -k compile_commands | 
複製貼上程式碼 ➡️ main.cpp
編譯和執行exe
|  | 
| xmake build xmake run | 
exe跑起來了,只是現在還有毛毛蟲
重開VSCode
|   | 
| 現在要不要? | 
|   | 
| 要 就自動幫你生成c_cpp_properties.json | 
|   | 
| 再執行1次 xmake project -k compile_commands | 
|   | 
| 毛毛蟲消失了 自動完成也能正常運作 | 
沒有留言:
張貼留言