如何在Eclipse中的远程计算机上构建c ++项目? [英] How to build a c++ project on a remote computer in Eclipse?

查看:80
本文介绍了如何在Eclipse中的远程计算机上构建c ++项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了Eclipse Ganymede的Windows电脑,以及我的C ++项目文件所在的Linux电脑。我使用Eclipse通过SMB编辑文件,并且想要使用Eclipse构建项目。
目前我使用putty连接到我的linux机器,并从相应的目录运行./make。我如何在Eclipse中运行相同的命令,并看到其中的结果?我已经安装了RSE插件,但仍然不能掌握如何这样做。

I have a Windows pc with Eclipse Ganymede installed, and a Linux pc where my C++ project files are located. I use Eclipse to edit the files through SMB, and would like to build the project using Eclipse as well. Currently I connect using putty to my linux machine, and run ./make from the appropriate directory. How would I run the same command within Eclipse and see the results in it? I have installed the RSE plugin, but still can't grasp how to do so.

只是为了清楚 - 我可以使用VNC工作的Eclipse安装在我的linux机器上,但我不喜欢这样做。 Eclipse通过VNC是缓慢的,不像我安装在Windows机器上的Eclipse响应。

Just to made myself clear - I can use VNC to work on Eclipse that is installed on my linux machine, but I prefer not do so. Eclipse through VNC is slow and not as responsive as the Eclipse installed on my windows machine.

谢谢,
Rouli

Thanks, Rouli

推荐答案

我在一个类似的情况,在Windows工作站中开发,编译在linux服务器。这是我结束所做的:

I was in a similar situation, developing in a windows workstation, compiling in a linux server. This is what I ended doing:


  1. 使用putty设置无密码登录编译器服务器,例如,您可以按照教程

  2. 使用putty创建登录会话,make确保在Connections / SSH / Auth中指向您的私钥。

  3. 将eclipse make命令修改为 plink.exe -loadsaved_sessionmake -C / remote / path / project (此设置位于Project / Properties / C ++ Build / Builder设置/ Build命令中)。

  1. Setup a passwordless login to the compiler server with putty, for example you can follow this tutorial.
  2. Create a login session with putty, make sure that in Connections/SSH/Auth is pointing to your private key.
  3. Modify eclipse make command to plink.exe -load "saved_session" make -C /remote/path/project (This setting is in Project/Properties/C++Build/Builder Settings/Build command). You can automate this with a batch/shell file if you have to pass more parameters and/or your setup is more complex.

如果您需要传递更多参数,您可以使用批处理/ shell文件自动完成此操作。您已经使用私钥存储了密码,然后您可以使用pageant.exe加载您的密钥一次,所以您不必每次键入您的密码短语。

If you have stored a passphrase with your private key then you can use pageant.exe to load your key only once, so you dont have to type your passphrase every time.

这篇关于如何在Eclipse中的远程计算机上构建c ++项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆