如何从 Xcode 5.02 运行 C++ [英] How to run C++ from Xcode 5.02

查看:40
本文介绍了如何从 Xcode 5.02 运行 C++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一段时间没有使用 Xcode,对 mac 来说还是个新手.我如何从 Xcode V5.02 运行 C++ 程序.我再也看不到命令​​行功能了?

I haven't used Xcode in awhile and overall new to macs. How od I run a C++ program from Xcode V5.02. I don't see a command line function anymore?

推荐答案

Xcode 通过 .mm 文件在 objective-c 项目中支持 C++,但不支持 C++.

Xcode supports c++ in objective-c projects through .mm files, but not on its own.

更新:猜我错了,请看这里:http://neilmonday.blogspot.com/2008/02/how-to-compile-basic-c-programs-in.html 和这里:如何在 XCode 中创建新的 C++ 项目?

UPDATE: Guess I was wrong, see here: http://neilmonday.blogspot.com/2008/02/how-to-compile-basic-c-programs-in.html and here: How do I create a new C++ project in XCode?

运行 xcode-select --install 以确保系统上安装了命令行工具.

Run xcode-select --install to make sure you command line tools installed on the system.

这篇关于如何从 Xcode 5.02 运行 C++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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