0

MSVS 2013 で最新の Gecko SDK (xulrunner-34.0.5.en-US.win32.sdk) を使用していますが、リンカーで深刻な問題に直面しています (明らかに私だけではありません)。

さまざまな問題に対する多くの回避策の後、次のリンカー エラーが発生します。

            Error   3   error LNK2001: unresolved external symbol "enum tag_nsresult __cdecl NS_TableDrivenQI(void *,struct nsID const &,void * *,struct QITableEntry const *)" (?NS_TableDrivenQI@@YA?AW4tag_nsresult@@PAXABUnsID@@PAPAXPBUQITableEntry@@@Z)   C:\Users\user\Desktop\sample\sample\sample\nsSample.obj sample
            Error   4   error LNK2001: unresolved external symbol "public: unsigned short const * __thiscall nsAString::BeginReading(void)const " (?BeginReading@nsAString@@QBEPBGXZ)   C:\Users\user\Desktop\sample\sample\sample\nsSample.obj sample
            Error   5   error LNK2001: unresolved external symbol "public: virtual enum tag_nsresult __thiscall mozilla::GenericModule::CanUnload(class nsIComponentManager *,bool *)" (?CanUnload@GenericModule@mozilla@@UAE?AW4tag_nsresult@@PAVnsIComponentManager@@PA_N@Z)  C:\Users\user\Desktop\sample\sample\sample\nsSampleModule.obj   sample
            Error   6   error LNK2001: unresolved external symbol "public: virtual enum tag_nsresult __thiscall mozilla::GenericModule::UnregisterSelf(class nsIComponentManager *,class nsIFile *,char const *)" (?UnregisterSelf@GenericModule@mozilla@@UAE?AW4tag_nsresult@@PAVnsIComponentManager@@PAVnsIFile@@PBD@Z)   C:\Users\user\Desktop\sample\sample\sample\nsSampleModule.obj   sample
            Error   7   error LNK2001: unresolved external symbol "public: virtual enum tag_nsresult __thiscall mozilla::GenericModule::RegisterSelf(class nsIComponentManager *,class nsIFile *,char const *,char const *)" (?RegisterSelf@GenericModule@mozilla@@UAE?AW4tag_nsresult@@PAVnsIComponentManager@@PAVnsIFile@@PBD2@Z) C:\Users\user\Desktop\sample\sample\sample\nsSampleModule.obj   sample
            Error   8   error LNK2001: unresolved external symbol "public: virtual enum tag_nsresult __thiscall mozilla::GenericModule::GetClassObject(class nsIComponentManager *,struct nsID const &,struct nsID const &,void * *)" (?GetClassObject@GenericModule@mozilla@@UAE?AW4tag_nsresult@@PAVnsIComponentManager@@ABUnsID@@1PAPAX@Z)   C:\Users\user\Desktop\sample\sample\sample\nsSampleModule.obj   sample
            Error   9   error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall mozilla::GenericModule::Release(void)" (?Release@GenericModule@mozilla@@UAEIXZ)  C:\Users\user\Desktop\sample\sample\sample\nsSampleModule.obj   sample
            Error   10  error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall mozilla::GenericModule::AddRef(void)" (?AddRef@GenericModule@mozilla@@UAEIXZ)    C:\Users\user\Desktop\sample\sample\sample\nsSampleModule.obj   sample
            Error   11  error LNK2001: unresolved external symbol "public: virtual enum tag_nsresult __thiscall mozilla::GenericModule::QueryInterface(struct nsID const &,void * *)" (?QueryInterface@GenericModule@mozilla@@UAE?AW4tag_nsresult@@ABUnsID@@PAPAX@Z)    C:\Users\user\Desktop\sample\sample\sample\nsSampleModule.obj   sample

SDK からすべての LIB ファイルを追加しましたが、まだ何も追加されていません。他の開発者から同様の問題を見つけましたが、解決策はありません:

http://forums.mozillazine.org/viewtopic.php?f=19&t=2288909

https://bugzilla.mozilla.org/show_bug.cgi?id=682259

最後のリンクは解決策を提供するはずですが、私 (およびそのページの別のユーザー) には機能しません。

この問題のヒント/解決策/提案はありますか?

アップデート:

を定義XP_WINした後、リンカ エラーが 1 つだけ発生します。

LNK2001: unresolved external symbol "public: unsigned short const * __thiscall nsAString::BeginReading(void)const " (?BeginReading@nsAString@@QBEPBGXZ) C:\Users\user\Desktop\sample\sample\sample\nsSample.obj sample

それはこの男と同じ場所に私をもたらすようです:

https://bugzilla.mozilla.org/show_bug.cgi?id=682259#c7

更新 2:

char16_tこれは、 mozillaChar16.hと MS の内部で競合する typedef で発生した以前の問題と関係がありましたyvals.h

typedef wchar_t char16_t;
vs
typedef unsigned short char16_t;

_CHAR16T私の新しい解決策は、MS ヘッダーの typedef-ing を防ぐために を定義することchar16_tでした。

4

1 に答える 1