How do I use a third-party DLL file in Visual Studio C++?

前端 未结 6 1488
北恋
北恋 2020-11-28 02:01

I understand that I need to use LoadLibrary(). But what other steps do I need to take in order to use a third-party DLL file?

I simply jumped into C++ and this is th

6条回答
  •  抹茶落季
    2020-11-28 02:22

    In order to use Qt with dynamic linking you have to specify the lib files (usually qtmaind.lib, QtCored4.lib and QtGuid4.lib for the "Debug" configration) in
    Properties » Linker » Input » Additional Dependencies.

    You also have to specify the path where the libs are, namely in
    Properties » Linker » General » Additional Library Directories.

    And you need to make the corresponding .dlls are accessible at runtime, by either storing them in the same folder as your .exe or in a folder that is on your path.

提交回复
热议问题