0
ld: duplicate symbol _main in /Users/.../i386/main-7E8F26AC10F53546.o and /Users/.../i386/main-B9843B6026D6EFA4.o
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2 failed with exit code 1

Anyone help with this error?

2 Answers 2

2

Sounds like you have more than one main() function in your code.

Sign up to request clarification or add additional context in comments.

2 Comments

Do i just search through each .h and .m or is there a faster way to search for it?
yes, you just search for it. you could install ack to search through your code files quickly.
0

ThiefMaster is right.. search for "main(" in your project and try to clean all targets and build again.

2 Comments

Do i just search through each .h and .m or is there a faster way to search for it?
yes press - " command + shift + f " and a dialog will appear you can search there

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.