XCode 5 says I got a duplicate, which I don't

Posted by GoodMove on Stack Overflow See other posts from Stack Overflow or by GoodMove
Published on 2013-10-21T15:08:06Z Indexed on 2013/10/21 15:54 UTC
Read the original article Hit count: 165

Filed under:
|
|
|
|

The point is every time I try to run a C++ code in XCode 5 (the file s "File.cpp") xcode returns this:

duplicate symbol _main

ld: 1 duplicate symbol for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

And it only returns the error, when I got the following function whatever it contains:

int main()
{

}

I checked the folder, which XCode points to (where it says the duplicates are placed), but didn't find anything though. What am I supposed to do???

#include "File.h"
using namespace std;



void func (void){

cout << "Hello World!" << endl;

}

© Stack Overflow or respective owner

Related posts about c++

Related posts about xcode