why do I need to link a lib file to my project?

2019-02-05 01:07发布

I am creating a project that uses a DLL. To build my project, I need to include a header file, and a lib file. Why do I need to include the respective lib file? shouldn't the header file declare all the needed information and then at runtime load any needed library/dll?

Thanks

标签: c++ c dll
7条回答
叛逆
2楼-- · 2019-02-05 02:06

That is a so-called "import library" that contains minimal wiring that will later (at load time) ask the operating system to load the DLL.

查看更多
登录 后发表回答