I identified the problem.
Just to change  the Project Setting:  Properties|C/C++|Language|Treat 
wchar_t as Built-in Type --> No.


"CHEN Benfeng" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Hi,
>
> I am trying to build the "MFCembed" example using Visual C++.Net 2003 
> under WinXP. And I got the below linker errors. The problem is mainly 
> about nsString and nsSubString.
>
> In fact, there are a lot of places using nsString. But only this function 
> "ReplaceChar" will cause linker error.
> Why ?
>
> Thanks a lot.
>
> -------------------Copy of the error message --------
> Linking...
> LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other 
> libs; use /NODEFAULTLIB:library
> BrowserView.obj : error LNK2019: unresolved external symbol 
> "__declspec(dllimport) public: void __thiscall 
> nsString::ReplaceChar(wchar_t,wchar_t)" 
> ([EMAIL PROTECTED]@@[EMAIL PROTECTED]) referenced in function 
> "protected: void __thiscall CBrowserView::OnFileSaveAs(void)" 
> ([EMAIL PROTECTED]@@IAEXXZ)
> BrowserView.obj : error LNK2019: unresolved external symbol 
> "__declspec(dllimport) public: void __thiscall 
> nsSubstring::Replace(unsigned int,unsigned int,wchar_t const *,unsigned 
> int)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]) referenced in function 
> "public: void __thiscall nsSubstring::Append(wchar_t const *,unsigned 
> int)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED])
> BrowserView.obj : error LNK2001: unresolved external symbol 
> "__declspec(dllimport) public: static wchar_t const * const 
> nsCharTraits<wchar_t>::sEmptyBuffer" 
> ([EMAIL PROTECTED]@_W@@2PB_WB)
> BrowserFrameGlue.obj : error LNK2001: unresolved external symbol 
> "__declspec(dllimport) public: static wchar_t const * const 
> nsCharTraits<wchar_t>::sEmptyBuffer" 
> ([EMAIL PROTECTED]@_W@@2PB_WB)
> BrowserView.obj : error LNK2019: unresolved external symbol 
> "__declspec(dllimport) public: void __thiscall nsSubstring::Assign(wchar_t 
> const *,unsigned int)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]) referenced 
> in function "public: __thiscall nsAutoString::nsAutoString(wchar_t const 
> *,unsigned int)" (??0nsAutoString@@[EMAIL PROTECTED]@Z)
> BrowserFrameGlue.obj : error LNK2001: unresolved external symbol 
> "__declspec(dllimport) public: void __thiscall nsSubstring::Assign(wchar_t 
> const *,unsigned int)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED])
> BrowserView.obj : error LNK2019: unresolved external symbol 
> "__declspec(dllimport) public: void __thiscall nsSubstring::Adopt(wchar_t 
> *,unsigned int)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]) referenced in 
> function "public: __thiscall nsGetterCopies::~nsGetterCopies(void)" 
> (??1nsGetterCopies@@[EMAIL PROTECTED])
> BrowserFrameGlue.obj : error LNK2019: unresolved external symbol 
> "__declspec(dllimport) wchar_t * __cdecl ToNewUnicode(class nsAString 
> const &)" (__imp_?ToNewUnicode@@YAPA_WABVnsAString@@@Z) referenced in 
> function "public: virtual void __thiscall 
> CBrowserFrame::BrowserFrameGlueObj::GetBrowserFrameTitle(wchar_t * *)" 
> ([EMAIL PROTECTED]@CBrowserFrame@@[EMAIL PROTECTED])
> Debug/vtidy.exe : fatal error LNK1120: 6 unresolved externals
>
> 


_______________________________________________
mozilla-embedding mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-embedding

Reply via email to