I am trying to build main.cpp
file
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main()
{
int count=0;
vector<string> msg {"Hello", "C++", "World", "from", "VS Code", "and the C++ extension!"};
for (const string& word : msg)
{
count++;
cout << word << "";
}
cout << endl;
}
Using C++ and WSL in VS Code but it ends. This example I can build it on WSL directly
x86: g++-7 main.cpp -o main.x86_64
ARM64: aarch64-linux-gnu-g++ main.cpp -o main.arm64
My task.json file is
{
"type": "shell",
"label": "aarch64-linux-gnu-g++",
"command": "/usr/bin/aarch64-linux-g++",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}.arm64"
],
"options": {
"cwd": "/usr/bin"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
}
}
How this can be built (cross-compiled) for remote ARM-target machines in VSCode and remotely debugged?
I have IP address for target ssh-machine, and locally on Win10/WSL I have installed "aarch64-linux-gnu-gcc"... I can do it manually it means cross-compile it and scp-ing to target and execute there.