惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
Stack Overflow Blog
Stack Overflow Blog
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
T
The Blog of Author Tim Ferriss
博客园 - 叶小钗
N
Netflix TechBlog - Medium
腾讯CDC
C
Check Point Blog
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
S
SegmentFault 最新的问题
F
Fortinet All Blogs
美团技术团队
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 司徒正美
F
Full Disclosure
Recorded Future
Recorded Future
D
DataBreaches.Net
博客园 - 【当耐特】
Martin Fowler
Martin Fowler
J
Java Code Geeks
I
InfoQ
Y
Y Combinator Blog
A
About on SuperTechFans
AI
AI
爱范儿
爱范儿
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Forbes - Security
Forbes - Security
W
WeLiveSecurity
M
MIT News - Artificial intelligence
雷峰网
雷峰网
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
Schneier on Security
Schneier on Security
The GitHub Blog
The GitHub Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
Latest news
Latest news
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Docker
Recent Commits to openclaw:main
Recent Commits to openclaw:main
量子位
V2EX - 技术
V2EX - 技术
Project Zero
Project Zero

博客园 - 松山居士

部署Hermes-Agent和SenseNova-Skills ubuntu用root账户启动服务指定脚本 WSL迁移OpenEuler虚拟机 采用Ollama本地布署DeepSeekCoderV2 Loongnix Server 23.2安装Docker及常用镜像 Ollama导出和导入DeepSeek预训练大模型 Win10上模拟LoongArch虚拟机安装Deepin系统 查看exe启动命令和参数 Visual Studio C++设置EXE和DLL在不同路径 JMeter做WEB和API自动化测试 PG数据库常用DDL C++库管理Conan使用备忘 Python多版本管理Anaconda备忘 Win10上模拟LoongArch虚拟机并搭建Qt5开发环境 解决向日葵无人值守自启动的权限问题 强制去掉Qt的运行环境信息 QGIS插件开发备忘 Linux shell 实用命令备忘 WIN10配置FX DocuCentre-IV C2260 PCL6打印机 VMWare虚拟磁盘整理与收缩 解决启用C++17后byte重定义的问题(byte ambiguous ) 解决Deepin安装Flatpak程序时不能创建临时文件的错误
VSCode+XMake开发环境搭建备忘
松山居士 · 2023-08-07 · via 博客园 - 松山居士

一、开发环境搭建

1、安装VSCode、XMake。

 2、在VSCode插件商店中安装C/C++和XMake插件。

   3、创建工程,在指定文件夹目录下运行xmake create命令。

 4、尝试编译并配置环境,在xmake.lua目录运行xmake -v -y命令。

 5、运行与调试。

xmake f -m debug
xmake xmake run
-d

6、采用VSCode环境编译调试,创建Task.json文件:Terminal->Configure Tasks...->C/C++:cl.exe build active file。会自动生下如下json内容,按F5配置好Launch.json文件后开始编译调试。

{
    "version": "2.0.0",
    "tasks": [
        {
            "type": "cppbuild",
            "label": "C/C++: cl.exe build active file",
            "command": "cl.exe",
            "args": [
                "/Zi",
                "/EHsc",
                "/nologo",
                "/Fe${fileDirname}\\${fileBasenameNoExtension}.exe",
                "${file}"
            ],
            "options": {
                "cwd": "${fileDirname}"
            },
            "problemMatcher": [
                "$msCompile"
            ],
            "group": "build",
            "detail": "compiler: cl.exe"
        }
    ]
}

 至此基础的开发环境搭建完毕。

二、其它使用方法备忘

1、新增第三方依赖包,可以指定固定版本号,也可以用^号指定不低于指定的版本号。但这个从github上下载包特别慢,也容易失败。

2、手动查询三方库。xrepo search xxx

3、手动安装指定的三方库。xrepo install xxx

4、安装到指定目录。xmake install --installdir=./deploy

5、将程序打包成软件包。xmake package

6、设置xmake。xmake f --menu