I'm in compileing iphuc under VC6, the getopt got error of
error LNK2001: unresolved external symbol "int __cdecl getopt(int,char * *,char *)" (?getopt@@YAHHPAPADPAD@Z)
This is mean the getopt need to be compile as C function, so in the getopt.h declaie the function as
extern "C" {
int _cdecl getopt(int argc, char **argv, char *opstring);
}
Then the problem was solved. |