undefined reference to `function(int, char* const*)’ [duplicate]

This question already has an answer here:

file 1 – C++ code

void file1::crash(int id)
  int argc = 3;    
  char* const argv[3] = {" ",

  snprintf(argv[2], strlen(argv[2]), "%d", id);
  crashCmd(argc, argv); 

file2 – C code

int crashCmd (int argc, char* const argv[])
  //confidential code

I have checked all possible ways that could cause this linker error but I can’t figure out what causes this issue. Function name and arguments are same as far as I can see.

Source: c#

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.