简体   繁体   English

将C ++代码编译为独立应用程序.app

[英]Compile C++ code to standalone application .app

How can I compile c++ code to .app? 如何将C ++代码编译为.app? I've created console app in XCode, after compilation created xcodeproj file. 编译后创建xcodeproj文件后,我已经在XCode中创建了控制台应用程序。 But I need .app extention. 但是我需要.app扩展。

Additional description: I have Delphi for OS X, and C++ application. 附加说明:我有用于OS X和C ++应用程序的Delphi。 These apps are connected via socket. 这些应用程序通过套接字连接。 So all is going good. 所以一切进展顺利。 When i was testing I had opened c++ app in XCode and Run it. 当我测试时,我已经在XCode中打开c ++应用程序并运行它。 But now I need c++ app would be opened automatically by delphi. 但是现在我需要delphi自动打开c ++应用程序。 So, I had succes to open xcodeproj file, but it opens terminal window. 因此,我成功打开了xcodeproj文件,但是它打开了终端窗口。 I've searched for info in inthernet and found that application must not be created as console app. 我在互联网中搜索了信息,发现该应用程序不能创建为控制台应用程序。 Console apps can't be compiled to .app extention by XCode(if it can tell me the way please). 控制台应用程序无法通过XCode编译为.app扩展名(如果可以告诉我方法)。

So, please tell me how resolve. 所以,请告诉我如何解决。

UPDATE: Maybe i must recreate project as GUI project. 更新:也许我必须将项目重新创建为GUI项目。 So how rebuild to gui proj from c++ code 那么如何从C ++代码重建为GUI PROJ

In Xcode, try the Archiving window. 在Xcode中,尝试“存档”窗口。 This should let you save your compiled application as .app on OS X. 这应该使您可以在OS X上将已编译的应用程序另存为.app

More Info: https://developer.apple.com/library/content/technotes/tn2215/_index.html 更多信息: https : //developer.apple.com/library/content/technotes/tn2215/_index.html

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

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