简体   繁体   English

如何使我的应用程序使用Visual Studio查找第三方DLL?

[英]How can I make my application find a third-party DLL using Visual Studio?

I have read many issues regarding and followed each one but nothing seems to work. 我已经阅读并关注了许多问题,但似乎无济于事。

I am trying to include the rdkafka library into my project, but every time I run the application I am getting 我试图将rdkafka库包含到我的项目中,但是每次运行该应用程序时,我都会得到

The program can't start because librdkafka.dll is missing from your computer. 该程序无法启动,因为您的计算机缺少librdkafka.dll。

I can clearly see that librdkafka.dll as well as librdkafka.lib exist in the same directory. 我可以清楚地看到librdkafka.dlllibrdkafka.lib存在于同一目录中。 I have added the include files to the project, and I have also added the librdkafka.lib to the additional directories in the Linker section. 我已将包含文件添加到项目中,并且还将librdkafka.lib添加到链接器部分中的其他目录中。 The project builds fine but it throws that error at runtime. 该项目构建良好,但在运行时抛出该错误。

Does anyone know how I can solve this issue? 有谁知道我该如何解决这个问题?

When in Visual Studio by default it is searching for dlls in the project directory and running the application on its own will try to find the dlls in the current working directory. 默认情况下,在Visual Studio中时,它将在项目目录中搜索dll,然后单独运行该应用程序将尝试在当前工作目录中查找这些dll。 Moving the dlls to this location seems to solve the issue. 将dll移到此位置似乎可以解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Visual Studio Code 中使用第三方 DLL - How to use a Third-Party DLL in Visual Studio Code 如何在 Visual Studio C++ 中使用第三方 DLL 文件? - How do I use a third-party DLL file in Visual Studio C++? 如何在我的dll中集成第三方库? - How to integrate third-party libraries in my dll? 如何使第三方库对Boost线程使用是线程安全的? - How can I make a third-party library thread-safe for use with Boost threads? 在使用 Visual Studio 进行调试时,我的应用程序在外部 DLL 调用上冻结。 我怎样才能找到这个 DLL 的路径? - While debugging with Visual Studio, my application freezes on an external DLL call. How can I find the path to this DLL? 在 UWP 应用程序中包含第三方 DLL - 一步一步? - Including a third-party DLL in a UWP application - step by step? 麻烦包括我的C ++应用程序中的第三方代码 - Trouble including third-party code in my C++ application 如何使用另一个DLL为Qt制作第三方插件? - How to make a third party plugin for Qt using another DLL? 如何找到第三方DLL的调用约定? - How to find the calling convention of a third party dll? 如何链接(或解决)两个定义相同符号的第三方静态库? - How can I link with (or work around) two third-party static libraries that define the same symbols?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM