I want to create a dynamic library(.dll) for one of the components written in C++, used in my work. Couple of functions are declared as extern in a .h file and being refernced in the corresponding .cpp file. While linking them i'm getting Unresolved symbol error.
xxxx.obj : error LNK2019: unresolved external symbol "int __cdecl run_xxx(int,char * * const,struct st_xx *)" (?run_xxx@@YAHHQEAPEADPEAUst_xx@@@Z) referenced in function "int __cdecl start_xx(int,int,int,char * * const)" (?start_xx@@YAHHHHQEAPEAD@Z)
The usage of these functions is like, they need to be defined by any application using this library. So the definition for these functions will only be in the application using this library. Thus i could not add any other library having the definition of these APIs while linking.
How the extern APIs need to be handled while creating dll?