gpt4 book ai didi

c++ - 构建 C++ XPCOM 依赖错误

转载 作者:行者123 更新时间:2023-11-28 03:04:16 27 4
gpt4 key购买 nike

我正在构建我的 C++ XPCOM 以使用 Gecko sdk 24 进行扩展,但出现以下错误:

Error   15   error LNK2001: unresolved external symbol __imp__NS_CStringContainerInit2   xpcomglue_s_nomozalloc.lib   
Error 16 error LNK2001: unresolved external symbol __imp__NS_CStringContainerFinish xpcomglue_s_nomozalloc.lib
Error 17 error LNK2001: unresolved external symbol __imp__NS_CStringContainerInit xpcomglue_s_nomozalloc.lib
Error 18 error LNK2001: unresolved external symbol __imp__NS_GetServiceManager xpcomglue_s_nomozalloc.lib
Error 19 error LNK2001: unresolved external symbol __imp__NS_GetComponentManager xpcomglue_s_nomozalloc.lib
Error 20 fatal error LNK1120: 5 unresolved externals ..\..\..\firefoxExtension\xpi\components\gecko24\nsWin32Util.dll

预处理器:
MOZ_NO_MOZALLOC
XP_WIN
XP_WIN32

额外的依赖:xpcomglue_s_nomozalloc.lib

我曾经用 Gecko 10 构建 XPCOM,依赖项是
nspr4.lib
xpcom.lib
xpcomglue_s_nomozalloc.lib
但是我在 Gecko 24 中找不到 nspr4.lib 和 xpcom.lib,那么 Gecko 24 的正确设置是什么?

最佳答案

尝试链接 xul.lib?不过请注意,这是一个临时的解决方法;上游对二进制扩展变得非常敌对,如果可能的话,你可能会更幸运地通过 JS-ctypes 做事。不过,还没有针对 nomozalloc 进行测试;不确定效果如何。

关于c++ - 构建 C++ XPCOM 依赖错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20087884/

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