I’m making a application that uses the mongoose source to run a web server on iOS devices. I ran make to make the files necessary and added them to the project. It compiles just fine but when it gets to the linking portion it throws the following error:
ld: duplicate symbol _main in /Users/tyler/Library/Developer/Xcode/DerivedData/iServer-gnfryiiydesjxicyoqsybsqugulz/Build/Intermediates/iServer.build/Debug-iphonesimulator/iServer.build/Objects-normal/i386/main-111B0F2B16D0E565.o and /Users/tyler/Library/Developer/Xcode/DerivedData/iServer-gnfryiiydesjxicyoqsybsqugulz/Build/Intermediates/iServer.build/Debug-iphonesimulator/iServer.build/Objects-normal/i386/main-4AE49C4D6F0286C.o for architecture i386
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1
any suggestions?
Go through your project files thoroughly and make sure you do not have 2 files named
main.m. Remove the one that does not belong to your actual project.