Quantcast
Channel: Xiao Ling – Dynamsoft Developers
Viewing all articles
Browse latest Browse all 239

Raspberry Pi Development with Visual C++ for Linux

$
0
0

During Build 2016, Microsoft released a Visual Studio C++ extension for Linux. With the extension, you can use Visual Studio to write C++ code for Linux devices. In this post, let’s take a glimpse of how to install the extension and how to remotely build and debug C/C++ code for Raspberry Pi.

Getting Started

Install Visual Studio extension for Linux development

Download Visual C++ for Linux.

It will fail to install the extension if you do not have Cross Platform Mobile Development tools installed:

cross platform mobile development

Create a Linux project for Raspberry Pi

Open Visual Studio 2015. Click File > New > Project > Installed > Templates > Visual C++ > Cross Platform > Linux to create a new project for Raspberry Pi:

Visual Studio Linux Project

If you just want to create a simple console project, choose Console Application (Linux).

Open Configuration Manager, and then change platform to ARM.

Click menu Tools > Options > Cross Platform > Linux to create a new connection:

connect to Linux

Make sure you have installed following packages on Raspberry Pi:

sudo apt-get install openssh-server g++ gdb gdbserver

Build and debug your code:

remotely debug Raspberry Pi

What if you see the error message “Could not find a part of the path”?

Visual C++ for Linux error

Update your Visual Studio 2015 to the latest version and restart it:

Visual Studio 2015 update 2

When using Visual C++ for Linux, I got some weird issues occasionally. Hopefully, Microsoft will fix bugs and release updates as soon as possible.


Viewing all articles
Browse latest Browse all 239

Trending Articles