如何动态调用DLL。。。。(使用LoadLibrary()函数)
1.我用VC做了基于Win32的Dll(sample.dsw,sample.c,sample.h,sample.def ),
2.编译后产生(sample.dll , sample.lib)
3.做了个测试程序(Demo.dsw,Demo.c Demo.h),在项目里加入了(sample.h)文件。
4,编译 Demo.dsw, 连接时出现下列错误,
Demo.obj : error LNK2001: unresolved external symbol "__declspec(
dllimport) int __cdecl ShowMe(void)" (__imp_?howMe@@YAHXZ
)
Debug/Demo.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.