简体   繁体   English

在Xcode中运行SFML C ++应用程序的两个实例

[英]Run two instances of an SFML C++ app in Xcode

I wonder if there is a way of running an app in Xcode, and then, without closing it, launching another instance of the same app. 我想知道是否有一种方法可以在Xcode中运行应用程序,然后在不关闭它的情况下启动同一应用程序的另一个实例。

I want to know this because I want to create a program for network communication and need two instances to test how the program behaves. 我想知道这一点,因为我想创建一个用于网络通信的程序,并且需要两个实例来测试该程序的行为。

The program is written in C++ using SFMLs network module. 该程序使用SFMLs网络模块以C ++编写。

Obviously, I can get the desired effect by creating a new identical program and running it, but it would be easier if they where the same (save me the copy/paste before each run). 显然,我可以通过创建一个相同的新程序并运行它来获得预期的效果,但是如果它们位于相同的位置(在每次运行之前为我保存复制/粘贴)会更容易。

I'm running Xcode 6.4. 我正在运行Xcode 6.4。

I have never done this with XCode, but with any other IDE I would simply open the project twice, so two XCode instances are running, both on the same folder. 我从未使用XCode做到这一点,但是使用任何其他IDE,我只会打开项目两次,因此两个XCode实例都在同一文件夹上运行。 That way you have "shared" code and your changes are automatically there when you recompile and restart both instances. 这样,您就可以“共享”代码,并且当您重新编译并重新启动两个实例时,所做的更改将自动存在。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM