简体   繁体   English

如何在Xcode 4.2中运行zxing?

[英]How to run zxing in Xcode 4.2?

friends 朋友们

Now, I upgraded xcode 4.2 and iOS SDK 5.0. 现在,我升级了xcode 4.2和iOS SDK 5.0。

It looks nice, but problem is that I can't run my zxing sample app in xcode 4.2. 看起来不错,但问题是我无法在xcode 4.2中运行我的zxing示例应用程序。

I always see following error message: 我总是看到以下错误消息:

"unsupported compiler 'GCC 4.2' selected for architecture 'armv7'". “为体系结构'armv7'选择了不受支持的编译器'GCC 4.2'”。

How can I solve this prolblem? 我该如何解决这个问题?

Any good idea or experience? 有什么好主意或经验吗?

Please help me... 请帮我...

Best regards and thanks. 最好的问候和感谢。

You need to reset the compiler to either llvm-gcc or clang (which is listed as "Apple default compiler" or something like that in Xcode 4.2). 您需要将编译器重置为llvm-gcc或clang(列为“ Apple默认编译器”或Xcode 4.2中的类似名称)。 gcc (as both front and backend) is not supported in Xcode 4.2. Xcode 4.2不支持gcc(作为前端和后端)。

The original zxing Xcode projects set the compiler to gcc because llvm prior to Xcode 4.2 miscompiled zxing if you enabled optimizations. 最初的zxing Xcode项目将编译器设置为gcc,因为如果启用了优化,则Xcode 4.2之前的llvm会错误编译zxing。 Xcode 4.2 fixed those issues so either compiler setting should work. Xcode 4.2解决了这些问题,因此任何一个编译器设置都可以使用。 (There are still issues with clang and C++ but those don't seem to affect zxing.) (clang和C ++仍然存在问题,但似乎并不影响zxing。)

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

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