在 Windows 7 上使用 libmysql.dll

发布于 2024-12-12 20:26:34 字数 350 浏览 2 评论 0原文

我一直在开发一个连接到 libmysql.dll 的程序。在使用它的代码部分中,我包含了winsock2.h和mysql.h。我已经编写了该程序,它在 Linux 和 Windows XP 上都运行得很好。

对于 Windows XP,我发现 libmysql.dll 必须位于 system32 目录中才能使代码正常工作。然而,在Windows 7中,即使在system32中拥有libmysql.dll文件也不允许它工作。显然它找不到 libmysql.dll。鉴于这是一个 pidgin 插件,这是 Pidgin 不需要的唯一库,因此我必须将其放置在某个地方。问题是我不知道在哪里。

它必须放置在较新的系统(例如 Windows 7)上的什么位置?

I have been working on a program which connects to libmysql.dll. In the part of the code that uses it, I have included both winsock2.h and mysql.h. I have written the program already and it works really well on both Linux and Windows XP.

For Windows XP, I have found that libmysql.dll must be in the system32 directory in order for the code to work. However, in Windows 7, even having the libmysql.dll file in system32 does not allow it to work. Apparently it could not find libmysql.dll. Given that this is a pidgin plugin, that is the only library that is not required by Pidgin, and therefore I had to place it somewhere. The problem is, I don't know where.

Where must it be placed on newer systems, like Windows 7?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情绪失控 2024-12-19 20:26:34

的一部分

libmysql.dll 文件是 MySQL Connector/C lib- http://dev 。 mysql.com/downloads/connector/c/

您是否尝试过将文件放入应用程序正在启动的目录中?

除非使用此 dll 的程序是以在特定位置搜索 dll 的方式编写的(不太可能),否则它应该以两种方式工作 - system32 或程序的运行目录。

编辑:

还要确保 system32 目录存在于您的 %PATH% 环境变量中。

The libmysql.dll file is a part of the MySQL Connector/C lib-

http://dev.mysql.com/downloads/connector/c/

Have you tried placing the file in the directory your application is being launched?

Unless the program that makes use of this dll was written in a way that it's searching for the dll in specific places (unlikely), it should work both ways - system32 or the program's running directory.

Edit:

Also make sure that the system32 dir exists in your %PATH% environment variable.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文