简体   繁体   English

如何在Linux(Ubuntu)服务器上运行Visual Studio代码

[英]how to run a Visual Studio code on a Linux (Ubuntu) server

running native C++ code on Linux server 在Linux服务器上运行本机C ++代码

Hello, everyone 大家好

I have implemented an algorithm in native C++ using Visual Studio 2010, and it runs well on my local PC. 我已经使用Visual Studio 2010在本机C ++中实现了一种算法,并且该算法在本地PC上运行良好。 Now I want to run the processing on another remote Linux server with more CPUs. 现在,我想在具有更多CPU的另一台远程Linux服务器上运行该处理。

Ideal case, I would like to control the process from my local windows PC and run remotely using many CPUs on Linux. 理想情况下,我想从本地Windows PC控制进程,并使用Linux上的许多CPU远程运行。 In a simplified situation, I would like to run the program directly on the server. 在简化的情况下,我想直接在服务器上运行该程序。

Could anyone give some recommendations how I can implement this? 任何人都可以提出一些建议,以实现这一目标吗?

you'll have to compile the code to produce a Linux binary. 您必须编译代码以生成Linux二进制文件。 As Visual Studio doesn't run on linux, or produce such binaries, you'll have to use a linux compiler - such as GCC or LLVM - to do this. 由于Visual Studio不能在Linux上运行或生成此类二进制文件,因此您必须使用Linux编译器(例如GCC或LLVM)来执行此操作。

Once that task is done you might have to make some changes to the code to make it compile without any Windows-specific calls in it. 完成该任务后,您可能必须对代码进行一些更改以使其在没有任何Windows特定调用的情况下进行编译。 After that, just run the program. 之后,只需运行该程序。

To communicate between machines, you'll have to make the program talk across the network - this is not a Linux/windows problem as you could get 2 windows machines to work in the same way. 要在机器之间进行通信,您必须使程序通过网络进行通信-这不是Linux / windows问题,因为您可以使2台Windows机器以相同的方式工作。 Try writing another exe that can communicate with your program and run them both on the same machine to start with, then you can move your program to another networked machine and see if it still works. 尝试编写另一个可以与您的程序通信的exe,并在同一台计算机上同时运行它们,然后将程序移至另一台联网的计算机上,看看它是否仍然有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Linux 中运行 Visual Studio 代码 - How to run visual studio code in linux 在 linux 中运行 visual studio 代码 - run visual studio code in linux Visual Studio Code 无法在 Ubuntu 上运行 - Visual Studio Code doesnt run on Ubuntu 如何在 ubuntu 上运行一个文件,该文件是我用 Visual Studio 在 Windows 上为 Linux 编译的 - How to I run a file on ubuntu which i compiled with Visual Studio on Windows for Linux 我们可以在 Linux Ubuntu 中从应用程序为 Windows 安装 Microsoft Visual Studio(不是 Visual Studio 代码)吗? - Are we able to install Microsoft Visual Studio(not Visual Studio code) in Linux Ubuntu for windows from application? 如何在 Linux 上安装 Visual Studio Code? - How to install Visual Studio Code on Linux? 连接到 linux 服务器时无法在 Visual Studio 中运行活动文件 - Cannot run active file in visual studio when connected to linux server 如何在Visual Studio中运行Linux下编写的程序 - how to run program written under linux in visual studio Linux上的Visual Studio代码-当“ app.js不存在”时也不应该运行C#应用程序 - Visual Studio Code on Linux - How to run a C# application when “app.js does not exist”, nor should it 如何解决 Visual Studio Code Linux 中包含路径的问题? - How to fix the problem of include Path in Visual Studio Code Linux?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM