在编译协议处理程序的示例实现时,我得到了以下错误。我在Windows上使用GeckoSDK3.6,Visual 2010。我认为这个示例非常老,并且不是使用SDK.的3.6版本构建的。
函数(_imp?NS_NewGenericModule2@@YAIPBUnsModuleInfo@@PAPAVnsIModule@@@Z)中引用的1>nsKeywordModule.obj : error LNK2019:未解析的外部符号"__declspec(dllimport)无符号int __cdecl NS_NewGenericModule2(struct nsModuleInfo const *,class nsIModule *)“
1>nsKeywordProtocolHandler.obj : LNK2019:未解决的外部符号"__declspec(dllimport) public:__thiscall nsFixedCString::nsFixedCString(char *,unsigned,unsigned )“(_imp??0nsFixedCString@@QAE@PADII@Z)函数"public:__thiscall nsCAutoString::nsCAutoString(void)”(?0nsCAutoString@@QAE@XZ)
1>nsKeywordProtocolHandler.obj : error LNK2001:未解决的外部符号"__declspec(dllimport) public: static * nsCharTraits::sEmptyBuffer“(_imp?sEmptyBuffer@?$nsCharTraits@D@@2PADA)
1>nsKeywordProtocolHandler.obj : error LNK2019:未解决的外部符号"__declspec(dllimport) public:__thiscall nsACString_internal::nsACString_internal(char *,unsigned int,unsigned int)“(_imp??0nsACString_internal@@QAE@PADII@Z),在函数”__thiscall nsCString::nsCString::nsCString(char *,unsigned int,unsigned int)“(?0nsString@IAE@PADII@z)中引用。
发布于 2013-01-20 00:14:12
我相信示例使用的是完整的mozilla实现来获取头文件。现在,由于我们有壁虎sdk,所有内部链接都必须迁移才能使用冻结链接,因为壁虎sdk 3.6不支持内部链接。
因此,在我的例子中,我将nsAString.h改为nsStringAPI.h,并遵循其他指导方针
https://stackoverflow.com/questions/14384179
复制相似问题