I have a main project and a DLL project. The main executable links to the DLL.
In the main project I have a function:
int func(char *str)
{
.....
}
In the DLL project, I want to use this function. Can I forward declare this function and use it? Like:
int func(char *str);
int dllFunc()
{
...
status = func(str);
...
}
One (fairly common) way of doing it is to provide a callback from the application, i.e.
In DLL:
In application: