Windows 7 OpenLDAP Curl DLL 依赖地狱

发布于 2024-08-08 07:56:17 字数 2134 浏览 11 评论 0原文

我真的希望有人能帮助我,因为这个问题让我完全陷入困境和沮丧。

昨天,我在开发盒上安装了全新的 Windows 7 x64。

我安装了 VS2008,Tortoise SVN,进行了检查,编译了我当前的项目,一切都很好。

但是当我去运行(VS 中的 F5 或只是从 shell 运行 exe)时,我会看到一个如下所示的对话框:

悲伤
(来源:aliparr.net

所以我摆弄并且看不出明显的问题。我崩溃了depends.exe,认为可能缺少一个dll,然后我得到:

Eeek
(来源:aliparr.net

所以我玩,找到不同版本的 gpsvc.dll 和 ishims.dll 并将它们与 .exe 一起放入,没有运气。

如果我在 dependent 中进行配置文件(位于 vs 的输出窗口之后),我会得到以下信息:

..
Loaded "c:\windows\syswow64\ADVAPI32.DLL" at address 0x75F20000 by thread 1.  Successfully hooked module.

Loaded "c:\windows\syswow64\LPK.DLL" at address 0x76B20000 by thread 1.  Successfully hooked module.

Loaded "c:\windows\syswow64\USP10.DLL" at address 0x761C0000 by thread 1.  Successfully hooked module.

Loaded "c:\windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4926_none_508ed732bcbc0e5a\MSVCR90.DLL" at address 0x70570000 by thread 1.  Successfully hooked module.

Loaded "c:\users\ali\desktop\repository\development\trunk\spree\bin\debug\OPENLDAP.DLL" at address 0x001E0000 by thread 1.  Successfully hooked module.

Exited "c:\users\ali\desktop\repository\development\trunk\spree\bin\debug\SPREE.EXE" (process 0x5D4) with code -1073741701 (0xC000007B) by thread 1.

所以看来 openldap.dll 是在一切出错之前最后加载的东西。我需要这个 dll,因为我在应用程序中使用 cURL 进行一些 JSON 通信...

我尝试过移动文件并尝试不同的 dll,但老实说,我在这里表现得有点盲目。有人可以帮助我或指出正确的方向吗?

应该注意的是,这些 dll 和设置在 Windows Vista x64 和 x86 中工作正常 - 这是 Windows 7 的事情吗?

预先非常感谢,完成后我可能还剩下一些头发。


编辑

我现在已经意识到curl.exe 的死亡方式与openldap.dll 完全相同 - 我猜是一些Windows 7 问题? 你/有人可以在不依赖 openldap 的情况下使用curl 吗?是否有另一个轻量级 C/C++ 库可以让我通过 http 获取文档并执行奇怪的 http POST ?

谢谢

I really hope someone can be of help to me because this problem has me totally stuck and frustrated.

Yesterday I installed a fresh and shiney new Windows 7 x64 onto a development box.

I got VS2008 installed, Tortoise SVN, did a checkout, compiled my currently project, all fine and dandy.

But when I go to run (either F5 in VS or just running the exe from the shell) I get a dialog box that looks like this:

Sadness
(source: aliparr.net)

So I fiddle around and can't see an obvious problem. I bust out depends.exe, thinking maybe there's a dll missing, and I get this:

Eeek
(source: aliparr.net)

So I play, finding different versions of gpsvc.dll and ishims.dll and putting them in with the .exe, No luck.

If I do a profile in depends (which follows the Output window of vs), I get this:

..
Loaded "c:\windows\syswow64\ADVAPI32.DLL" at address 0x75F20000 by thread 1.  Successfully hooked module.

Loaded "c:\windows\syswow64\LPK.DLL" at address 0x76B20000 by thread 1.  Successfully hooked module.

Loaded "c:\windows\syswow64\USP10.DLL" at address 0x761C0000 by thread 1.  Successfully hooked module.

Loaded "c:\windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4926_none_508ed732bcbc0e5a\MSVCR90.DLL" at address 0x70570000 by thread 1.  Successfully hooked module.

Loaded "c:\users\ali\desktop\repository\development\trunk\spree\bin\debug\OPENLDAP.DLL" at address 0x001E0000 by thread 1.  Successfully hooked module.

Exited "c:\users\ali\desktop\repository\development\trunk\spree\bin\debug\SPREE.EXE" (process 0x5D4) with code -1073741701 (0xC000007B) by thread 1.

So it seems openldap.dll is the last thing to get loaded before it all goes wrong. I require this dll because I use cURL within the application to do a little JSON communicating...

I've tried playing with moving files and trying differing dlls, but honestly I'm acting a little blind here. Can someone please help or point me in the right direction?

It should be noted these dlls and setup work fine in Windows Vista x64 and x86 - is this a Windows 7 thing?

Massive thanks in advance, I might still have some hair left after this is done.


Edit

I've now realised curl.exe dies in exactly the same way with openldap.dll - I guess some windows 7 issue?
Can you/does anyone have a curl without the dependency on openldap? Is there another lightweight C/C++ library out there that'll let me fetch a document over http and do the odd http POST ?

Thanks

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

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

发布评论

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

评论(6

时光瘦了 2024-08-15 07:56:17

我自己也遇到了一个非常相似的问题:我正在开发一个C程序(使用MinGW gcc编译器),它使用curl库来执行http GET操作。我在 Windows XP(32 位)和 Windows 7(64 位)上进行了测试。我的程序在 Windows XP 中运行,但在 Windows 7 中它崩溃了,并出现与 OP 相同的 0xc000007b 错误消息。

我在一个精简的程序上使用了 Dependency Walker(仅调用一次curl 库:curl_easy_init())。我基本上得到了与您相同的日志,其中 OPENLDAP.DLL 作为崩溃前最后一个成功加载的模块。

然而,我的程序似乎在加载 LIBSASL.DLL 时崩溃了(这是根据 Windows XP 上运行的 Dependency Walker 的日志加载的下一个模块)。

当再次查看 Windows 7 上 Dependency Walker 的日志时,LIBSASL.DLL 确实显示了一个 x64 模块。我设法通过将 DLL 文件的 32 位版本从硬盘上的另一个应用程序复制到我的程序目录来运行我的程序。

希望这对其他有类似问题的人有用(如果这些年后问题仍然没有解决,也适用于OP)。如果将 32 位版本的 LIBSADL.DLL 复制到程序目录没有帮助,则另一个模块可能会导致崩溃。在 32 位和 64 位系统上运行 Dependency Walker,并从成功运行的日志中查找模块名称。

I had a very similar problem myself: I was developing a C program (using the MinGW gcc compiler) which used the curl library to do http GET operations. I tested it on Windows XP (32-bit) and Windows 7 (64-bit). My program was working in Windows XP, but in Windows 7 it crashed with the same 0xc000007b error message as the OP got.

I used Dependency Walker on a down-stripped program (with only one call to the curl library:curl_easy_init()). I essentially got the same log as yours, with OPENLDAP.DLL as the last successfully loaded module before the crash.

However, it seems my program crashed upon loading LIBSASL.DLL (which was the next module loaded according to the log from Dependency Walker run on Windows XP).

When looking again in the log from Dependency Walker on Windows 7, LIBSASL.DLL indeed shows up a x64 module. I managed to get my program to run by copying a 32-bit version of the DLL file from another application on my harddisk to my program's directory.

Hopefully this will work for other people having similar problems (also for the OP if the problem still wasn't resolved after these years). If copying a 32-bit version of LIBSADL.DLL to your program's directory doesn't help, another module might cause the crash. Run Dependency Walker on both the 32- and 64-bit systems and look up the module name from the log of the successful run.

无法言说的痛 2024-08-15 07:56:17

我无法完全回答你的问题,我已经在 Windows 7 Professional x64 上编译了 libcurl,并且没有任何问题。虽然我还没有使用 OpenLDAP 支持来编译它,所以我想这就是问题所在。

关于 IEShims.dll,Dependency Walker 通常将其报告为缺失模块。不记得确切的原因,但它是关于当在 %Path% 中找不到它时动态加载它的原因。

但是,如果您需要对此进行调试并且使用的是 Windows 7,请尝试执行从 %ProgramFiles%\Internet Explorer\IEShims.dll 到 %windir% 的硬链接。

尽管如此,我在屏幕转储中看到 Spree.exe 确实没有作为 x64 二进制文件加载,这很可能就是这样。加载导出函数和管道或 exec() 二进制文件是有区别的,首先提到的要求导入器和导出器的架构相同。

I cannot answer your questions completely, I've compiled libcurl on Windows 7 Professional x64 and I don't have any issues. Although I haven't compiled it with OpenLDAP support so I suppose that's where the issue lies.

Regarding the IEShims.dll, Dependency Walker usually reports this as a missing module. Can't remember the exact reason but it was something about loading it dynamically when it's not found in %Path%.

If you however need to debug this and are on Windows 7 then try doing a hard link from %ProgramFiles%\Internet Explorer\IEShims.dll to %windir%.

Although, I see on the screen dump that it sure looks like Spree.exe isn't loaded as a x64 binary, which could very well be it. There's a difference in loading exported functions and piping or exec() a binary, the first mentioned requires that the architecture is the same for both the importer and exporter.

久伴你 2024-08-15 07:56:17

我还发现我的程序正在尝试加载 64 位版本的 LIBSASL.DLL - 这是我的 64 位 Tortoise 发行版附带的版本。我也只需要curl 来提取一些JSON 数据。我认为最好的解决方案是从源代码重建 libcurl 并排除 LDAP,因为我不需要它。

I've also found that mine is trying to load a 64 bit version of LIBSASL.DLL - the one that came with my 64 bit Tortoise distribution. I also only need curl for pulling a bit of JSON data. I think the best solution is going to be to rebuild libcurl from source and exclude the LDAP since I don't need it anyway.

绝情姑娘 2024-08-15 07:56:17

类似的问题在这里。 DLL 依赖 GPSVC.DLL 和 MSVCR90.DLL。

我通过将环境变量路径设置为 C:\Program Files (x86)\Internet Explorer 成功摆脱了 IESHIMS.dll。当然不需要这样做!

这个问题有解决办法吗?

Similar issue here. DLL dependents GPSVC.DLL and MSVCR90.DLL.

I managed to get rid of IESHIMS.dll by setting my environment variables path to C:\Program Files (x86)\Internet Explorer. Surely that shouldn't need to be done!

Is there a fix to this yet?

不忘初心 2024-08-15 07:56:17

libsasl 需要 ieshims.dll,如果 openldap 中没有 sasl 支持,则不需要 ieshims.dll。

libsasl requires ieshims.dll, if you don't have sasl support in openldap, then ieshims.dll won't be required.

征棹 2024-08-15 07:56:17

如果您使用 Windows x64,则必须将 dll 复制到 c:/windows/SysWoW64。当我想在 windows os 8 中使用 pthreads 时,我遇到了同样的问题。当我将 pthreads dll 复制到 SysWow64 时,程序成功运行。

If you use windows x64 you have to copy your dll to c:/windows/SysWoW64. I have had the same problem when i wanted use pthreads in windows os 8. When I was copied pthreads dll to SysWow64 the program was run sucessfully.

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