Firefox 26 C ++ Addon XPCOM依赖性错误 [英] Firefox 26 C++ Addon XPCOM dependency error

查看:158
本文介绍了Firefox 26 C ++ Addon XPCOM依赖性错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为下一个Firefox准备了我的C ++ Firefox插件 - v.26 - 但我不能用xulrunner-sdk 26测试版(它与以前的主要版本是正常的)。就像以前一样,我链接到xpcomglue_staticruntime_s.lib,但我有这些错误:

I prepare my C++ Firefox addon for the next Firefox - v.26 - but I can't build it with xulrunner-sdk 26 beta (it is OK with the previous major versions). Just as before, I link it against xpcomglue_staticruntime_s.lib, but I've got these errors:


  • xpcomglue_staticruntime_s.lib(nsStringAPI .obj):error LNK2019:在函数public:__int64 __thiscall nsAString :: ToInteger64(enum tag_nsresult *,unsigned int)const中引用的未解析的外部符号_ imp _PR_sscanf(?ToInteger64 @ nsAString @@ QBE_JPAW4tag_nsresult @@ I @ Z)

  • xpcomglue_staticruntime_s.lib(nsStringAPI.obj) : error LNK2019: unresolved external symbol _imp_PR_sscanf referenced in function "public: __int64 __thiscall nsAString::ToInteger64(enum tag_nsresult *,unsigned int)const " (?ToInteger64@nsAString@@QBE_JPAW4tag_nsresult@@I@Z)

xpcomglue_staticruntime_s.lib(nsCRTGlue.obj):error LNK2019:未解析的外部符号_ imp _PR_Now in functionvoid __cdecl NS_MakeRandomString(char *,int)(?NS_MakeRandomString @@ YAXPADH @ Z)

xpcomglue_staticruntime_s.lib(nsCRTGlue.obj) : error LNK2019: unresolved external symbol _imp_PR_Now referenced in function "void __cdecl NS_MakeRandomString(char *,int)" (?NS_MakeRandomString@@YAXPADH@Z)

添加所有其他库从这个SDK(不仅是xul.lib和mozalloc.lib,而且crmf.lib等),它没有帮助。既不使用xpcomglue_s.lib也不使用xpcomglue_s_nomozalloc.lib而不是xpcomglue_staticruntime_s.lib

I added all other libraries from this SDK (not only xul.lib and mozalloc.lib but also crmf.lib etc.), it doesn't help. Neither works using xpcomglue_s.lib or xpcomglue_s_nomozalloc.lib instead of xpcomglue_staticruntime_s.lib

现在只有在使用xpcomglue.lib或xpcomglue_staticruntime.lib时,我才能成功创建addon,那么它不能与Firefox正常工作 - NS_GetServiceManager()失败。

Now I can build the addon successfuly only if I use xpcomglue.lib or xpcomglue_staticruntime.lib, but then it doesn't work correctly with Firefox - NS_GetServiceManager() fails. There are some linker warnings with these builds.

我需要什么设置使其与xpcomglue_staticruntime_s.lib链接或在其他情况下工作?

What settings I need to make it linking against xpcomglue_staticruntime_s.lib or working in other cases?

平台:MS Windows,MS Visual Studio 2010。

Platform: MS Windows, MS Visual Studio 2010.

两个详细信息:


  • 在以前的sdk版本中有nss3.lib,我添加了它,现在它丢失了

  • 我使用默认mozilla-config.h和xpcom-config .h,加上MOZILLA_STRICT_API宏

推荐答案

计划修复Mozilla 28(OMG!)有关详情请点击此处:
https ://bugzilla.mozilla.org/show_bug.cgi?id = 937005

It is confirmed bug in the SDK. A fix is planned for Mozilla 28 (OMG!) For details watch here: https://bugzilla.mozilla.org/show_bug.cgi?id=937005

同时我发现我可以使用旧版本的nss3.lib,用这个测试:
http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/25.0.1/sdk/xulrunner-25.0.1.en-US.win32。 sdk.zip

In meantime I found that I can use nss3.lib from older versions, tested with this one: http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/25.0.1/sdk/xulrunner-25.0.1.en-US.win32.sdk.zip

这篇关于Firefox 26 C ++ Addon XPCOM依赖性错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆