我在Kali Linux上,我正在尝试在Visual Studio Code上使用SFML库(C ++)。
要使用我安装的SFML:
apt-get install libsfml-dev
我从How do i link the SFML libraries in Visual Studio Code?开始尝试task.json:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "g++",
"isShellCommand": true,
"suppressTaskName": true,
"tasks": [
{
"taskName": "Compilation",
"isBuildCommand": true,
"args": ["-c", "${workspaceRoot}\\main.cpp", "-IC:\\SFML-2.4.0\\include"]
},
{
"taskName": "Liaison du fichier compilé aux bibliothèques SFML",
"args": ["${workspaceRoot}\\main.o", "-o", "sfml-app.exe", "-LC:\\SFML-2.4.0\\lib", "-lsfml-graphics", "-lsfml-window", "-lsfml-system"]
}
],
"showOutput": "always"
}
我有几个问题: Tasks.json是否正确? 如何保存Tsaks.json更改? 我是否必须将dll放入C ++项目中才能使其正常工作(如果需要,dll在哪里)?
如果有人可以帮助我解决这个问题,我将不胜感激。地穴