Passing argc and argv from main to other functions
Currently, i'm stuck on this code:
Code:
#include <stdio.h>
#include <stdlib.h>
int test(int ArgNum, char *ArgList[]) {
return 0;
}
int main(int argc, char *argv[]) {
test(argc, &argv[]);
return 1;
}
But it doesn't even get through compiling:
Code:
EmbedTestFunc.obj : error LNK2005: _main already defined in EmbedTest.obj
C:\Documents and Settings\...\Visual Studio 2005\Projects\EmbedTest\Debug\EmbedTest.exe : fatal error LNK1169: one or more
multiply defined symbols found
As far as I've seen examples, this should work, but it doesn't, so something's missing ... thanks.