int SayRunTimeDLL(int a, int b)
{
int c=a+b;
return c;
}
This is a function in my Dll file RunTimeDLL.dll located at C:\New Folder
HEre is my CPP file, in a totally new project in which m trying to import dis RunTimeDLL.dll but i am not able to. its Generating error.
------------------------------
Error 1 error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl SayLoadTimeDLL(int,int)" (__imp_?SayLoadTimeDLL@@YAHHH@Z) referenced in function _main C:\Users\user\Documents\Visual Studio 2010\Projects\test111\test111\test111.obj
I don't see a #pragma comment(lib "yourlibfiletolinkyourdll.LIB") line. You need one. Usually the compiler creates one for you when you compile your dll, but if not you can generate it afterwards. Here's one article you might like: http://support.microsoft.com/kb/131313