I am building Firefox 2.0.0.4 using the mozilla-build with VS 2005 in order to link XPCOM into a multithreaded dll for my application (currently debug). I have to use MOZILLA_INTERNAL_API because some of the non-frozen interfaces I need are not available in the Gecko-SDK (I know this will need to change for Firefox 3, but I need Firefox 2 now). I have built Firefox (numerous times with various options) with no problem. My problem is in building the dll in my application.
I am getting the following unresolved external errors building with VS 2005: nsSubstring::Assign(unsigned short const *,unsigned int)" (__imp_? [EMAIL PROTECTED]@@[EMAIL PROTECTED]) import.lib(xxx.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) nsCharTraits::EmptyBuffer(unsigned short const *,unsigned int)" ([EMAIL PROTECTED]@G@@2PEBGEB) import.lib(xxx.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) I have been working for the last two weeks and digging all over the net to resolve these errors by looking into: - Building Firefox with the right options to get the import/export signatures defined right - Preprocessor definitions within my dll - Libraries I am linking with or not linking with This is my current .mozconfig: . $topsrcdir/browser/config/mozilla mk-add-options MOZ_OBJDIR=../build/ff-static mk-add-options MOZ_CO_PROJECT=browser ac-add-options --with-windows-version-500 ac-add-options --enable-application=browser ac-add-options --enable-optimize=-Zc:whar_t- ac-add-options --disable-debug ac-add-options --disable-installer ac-add-options --enable-static ac-add-options --disable-shared ac-add-options --disable-tests My preprocessor defines are: XP_WIN, XP_WIN32, MOZILLA_STRICT_API, MOZILLA_INTERNAL_API. I am linking with: xpcom.lib, xpcom_core.lib, nspr4.lib, plc4.lib, plds4.lib, embed_base_s.lib (embed_base_s.lib did resolve some other link errors). I have tried linking with string_s.lib. This did not work, it only brought up more unresolved external link errors and several string classes already defined in xpcom_core.lib errors. I have set "Treat wchar_t as Built-in Type" within my dll to 'Yes' and 'No' - still get the same results either way. I am now at a dead end. I have tried everything I have run across or could think of. If anyone has any suggestions, I would greatly appreciate them. I am desparate and begging for any help anyone could give me. _______________________________________________ dev-embedding mailing list [email protected] https://lists.mozilla.org/listinfo/dev-embedding
