gpt4 book ai didi

c++ - msvcrt.dll 和 pcre 库出错

转载 作者:可可西里 更新时间:2023-11-01 10:07:33 25 4
gpt4 key购买 nike

我写了一个 C 程序,在 Windows 7 和 Linux 上运行良好,但是当我在 Windows XP 上执行它时出现错误:

"_except_handler4_common could not be located in the dynamic link library msvcrt.dll"

我研究了一下,有人说要删除我没有的DLL“dwmapi.dll”,所以这不是我的问题。

有人告诉我使用 depends walker(depends.exe) 来查找谁在使用 msvcrt.dll。我做了,发现 pcre 库正在使用它,实际上它有问题,但我不知道如何解决这个问题。谁能帮帮我?

这是沃克给我看的图片:

enter image description here

最佳答案

可能的原因(afaiu):

a) You linked to msvcrt.dll specifically when building - this should not happen according to Microsoft support unless you specifically do it.

b) Some other installed or copied program/driver on your XP that links to "wrong" version of msvcrl.dll is being triggered.

根据具体原因,这里有一些要解决的想法:

1) There might be some program/driver/etc. installation on your XP machine that has introduced "Vista/Win7 related crap" onto it. It is said (by the internets) that PCRE3.DLL belongs to "GnuWin32 Non-system processes". That means you can try to find it and rename/delete it. Or delete the program you that uses it.

2) Installing the redist for XP of the C++ redistributable that you used to build on Win7 might help. This is link for VS2005: (darn.. use google - i can only give two links per post :P)

重建:

3) Just build the file from sources on your XP machine using some VisualStudio version you can get on it. And check those VS project properties!

4) Fix your build on Windows7. You might be linking to _except_handler4_common in msvcrt.dll in your Windows 7 build. Make sure that you do not do that. You can specifically instruct the linker not to link to it in VisualStudio project properties "/NODEFAULTLIB:msvcrt80.lib". You also did not specify what are you using for building. VS2005, VS2008, VS2010, gcc?

答案基于有根据的猜测和 Jeffrey Tan research here :

research here :

关于c++ - msvcrt.dll 和 pcre 库出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13163318/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com