我想在远程Linux PC上为嵌入式目标交叉编译一个项目,但这需要进行环境设置。
我有一个环境设置脚本。我可以在远程Linux PC的shell中运行此脚本,并且它正确地设置了我的环境变量。构建脚本使用这些环境变量,并且在本地成功构建。
我使用Visual Studio Code通过远程SSH扩展连接到PC。我似乎无法在外部的Visual Studio Code中进行构建。尽管我通过任务设置了环境,但环境变量并未设置。由于此原因,构建脚本无法找到正确的路径。
这是我的tasks.json文件:
我也尝试了以下方法,但没有帮助:
我有一个环境设置脚本。我可以在远程Linux PC的shell中运行此脚本,并且它正确地设置了我的环境变量。构建脚本使用这些环境变量,并且在本地成功构建。
我使用Visual Studio Code通过远程SSH扩展连接到PC。我似乎无法在外部的Visual Studio Code中进行构建。尽管我通过任务设置了环境,但环境变量并未设置。由于此原因,构建脚本无法找到正确的路径。
这是我的tasks.json文件:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "env",
"type": "shell",
"command": "source",
"args": ["/opt/fslc-framebuffer/2.5-qt/environment-setup-armv7at2hf-neon-fslc-linux-gnueabi"]
},
{
"label": "qmake frontend",
"type": "shell",
"command": "/opt/fslc-framebuffer/2.5-qt/sysroots/x86_64-fslcsdk-linux/usr/bin/qmake",
"args": ["${workspaceFolder}/frontend/frontend.pro", "-config", "release", "CONFIG+=imx6ul-linux"],
"problemMatcher": [
"$gcc"
],
},
{
"label": "build frontend",
"dependsOn": [
"env",
"qmake frontend"
],
"dependsOrder": "sequence",
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
我也尝试了以下方法,但没有帮助: