I have left some problems that occurred when using the previously created article (remote debugging of Linux apps in Visual Studio 2017) environment and some solutions. I think this.
It seems that a compile error occurred because the necessary files could not be found at build time due to reasons such as updating the GNU C library.
The problem was solved by updating / installing the GNU C library (libc) related items and then restarting. It seems to be the quickest to update the package with the following command.
sudo apt update
sudo apt upgrade
If you want to install only what you need individually, you can probably do less. (This may be over or under.)
sudo apt update
sudo apt install libc6-dev
sudo apt install libc6-amd64
sudo apt install libc6-dev-amd64
sudo apt install build-essential
As the heading says. If you try to use pthread's FIFO scheduling, you will need root privileges. However, when it is executed in the environment of the previous article, it does not work as expected because it cannot be executed with root privileges.
It's a rather brute force, but I've just allowed the root user for ssh connections. Changed "PermitRootLogin" in "/ etc / ssh / sshd_config" to "yes". Set the root user password with the following command
sudo passwd root
From the VS2017 side, add the one of the root user to the ssh connection destination, and use it thereafter.
If "-l ◯◯" is described in the place described in the previous article, it will be described before the description of the source code to be compiled as a compile option. Therefore, it becomes impossible to link the library that must describe the library link option after the description of the source file to be compiled such as the math library.
By adding "-l ○○" after "Project Properties"-> "Linker"-> "All Options"-> "Additional Dependent Files", it will be expanded after the description in the code file. You can compile without any problems.
[reference] https://blogs.msdn.microsoft.com/vcblog/2016/03/30/visual-c-for-linux-development/#verbose
Recommended Posts