Hi all
I have a main program that loads a dll and calls functions inside dll. Everything is fine.
Now I would like to call a function belonging to the main exe from the dll. I didi this:

main.c:
__declspec(dllexport) void HelloWorld(void)
{
printf("The function was called by dll! \n");
}

On dll, .cpp file, on top:
__declspec(dllimport) void HelloWorld(void);


On a dll method which is called from EXE I call:

int DLL_EXPORT Finalize(void)
{
exitCondition=0;
printf("Thread was killed\n");

HelloWorld();

return 0;
}


but compiler says:

...\main.cpp|59|undefined reference to `_imp___Z8HelloWorldv'|


How to solve this?

Thanks a lot

Alex