简体   繁体   中英

Why is Xcode 3 displaying multiple compiler errors or warnings for each that actually occurs

When I build in Xcode, any errors or warnings are being duplicated. So in the IDE, I get twice the number near the icons in the status bar, and where the yellow or red bubbles show up in the editor, there are two warning lines (or error lines) below the line where the warning (or error) occurred. Anyone else have this problem, or know how to fix it?

Are you doing a release build? If so, it may be hitting the errors once while doing the PPC build, and again for the intel build.

When GCC is run with multiple -arch flags, it will produce a warning and/or error for each architecture because the compiler is essentially being run multiple times.

If you have set your project to be a Universal app containing both PPC and i386 binaries then you will get two errors/warnings, provided that the error/warning applies to both architectures.

The above answers are correct but don't tell how to fix it. Go to Project -> Edit Project Settings, and check the "Build Active Architecture Only" button in the Architectures section. Why Apple doesn't check this by default for debug projects is beyond me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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