If you do a prototype for a C function in C++, you should use
, which tells the compiler to use "classic C" prototype interpretation, rather than C++ interpretation.
extern "C" int somefunction();
Of course, it doesn't really matter if you use main() or main(void) in the case where the callee cleans up the stack - it's impossible for the callee to know how many arguments where passed - there is also
, where three arguments are passed.
int main(int argc, char **argv, char **envp);