执行时动态库链接 [英] Dynamic library Linking at execution
本文介绍了执行时动态库链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为什么在编译时无法在链接处加载库?我不在乎释放图书馆,但它不起作用.
why did it fail to load the library at link at compilation time? i don't care about freeing the library yet it just won't work.
#include <windows.h>
int main()
{
LoadLibrary("winmm.lib");
timeGetTime();
}
推荐答案
试试这个代码.它应该可以解决您的问题.
Try this code. It should solve your problem.
#include <windows.h>
#pragma comment(lib, "winmm.lib")
int main()
{
DWORD time = timeGetTime();
}
这篇关于执行时动态库链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文