也就是静态库lib文件?这个pragma comment(lib....)应该和动态库没有关系吧?
------------------------MSDN提供的信息对我的问题似乎没有什么帮助啊:
libPlaces a library-search record in the object file. This comment type must be accompanied by a commentstring parameter containing the name (and possibly the path) of the library that you want the linker to search. Since the library name precedes the default library-search records in the object file, the linker searches for this library just as if you had named it on the command line. You can place multiple library-search records in the same source file; each record appears in the object file in the same order in which it is encountered in the source file.还请高人一定解答一下,谢谢了!

解决方案 »

  1.   

    这个是引入lib文件,也就是隐式链接DLL。DLL分静态链接和动态链接,加载DLL分隐式链接和显示加载,和DLL分静态链接和动态链接是两回事。
      

  2.   

    1L的高人:隐式链接不就是dll在编译选项里面静态链接吗?
    显示加载不就是LoadLibrary动态加载吗? 我怎么越听越晕了啊... ...
    谢谢
      

  3.   


    你这么理解也可以。但是这个是从DLL的使用者的角度看的。
    从DLL的角度看,分为静态链接和动态链接,静态链接就是说DLL作为加载者程序一部分编译进加载的程序中,加载程序运行的时候就不用DLL了,因为DLL已经在加载者程序里面了。动态链接就是以DLL的方式提供,加载程序启动的时候需要加载DLL。
      

  4.   

    补充:隐式链接和显示加载都是针对动态链接的DLL而言,对静态链接DLL来说,因为DLL的程序已经编译进加载程序了,所以不存在隐式链接还是显示加载的说法了。