This answer is written for C++ developers, because I was haunted by such problem as one. Here is the solution:
Instead of
main()
{
}
please type
int main()
{
}
so the main function can be executed.
By the way, if you compile a C/C++ source file with no main function to execute, there will definitely be a bug message saying:
"[Error] Id returned 1 exist status"
But sometimes we just don't need main function in the file, in such a case, just ignore the bug message.