How do I reference a DLL in a VC++ project

后端 未结 6 2055
野性不改
野性不改 2021-02-03 13:42

I have a C++ driver I\'m trying to compile, and it has this line in the code:

#import \"msado15.dll\" no_namespace rename(\"EOF\", \"EndOfFile\")
6条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-03 14:06

    You can place the DLL in the same path as the referencing file (.h) as you have done, alternatively you can modify the additional include paths for the LIB section of your project(s). In VC++ this will be:

    Project | Properties | Configuration Properties | Linker | General | Additional Library Directories

    This method can be useful if you are centralizing third party dependencies and you don't want to be forced to keeping the referenced file (.h) and DLL in sync via the same path.

    See this MSDN link for further details.

提交回复
热议问题