abhilash maniam wrote:
Hi,

I am trying to compile the weblock code given in the new XPCOM book http://www.mozilla.org/projects/xpcom/book/cxc/html/weblock.html#1007404.

I am using Visual Studio .NET and have followed the instructions for compiling in the same book Appendix A.

I haven't tried compiling with Visual Studio .Net, so results may vary. I would guess that it shouldn't be too bad based on experiences converting projects from VC6 to VC7(.net)



I have the following questions:
a) Why is nsXPIDLString.h not present in string directory under gecko-sdk?

nsXPIDLString is not frozen and I would advise just sticking to nsEmbedString if at all possible. If you must use nsXPIDLString.h, you can grab it from a built version of mozilla. See http://www.mozilla.org/build/ for direction on how to do this.


Also why are the headers in the public directory not available in string?

Not all of the files in "public" directories in the mozilla cvs tree are public to embedders and component developers. In fact, most isn't. The only parts of "strings" that is frozen is nsAString, nsACString, and virtual classes that these two require.


b) I get the linker errors similar to the following:

SampleGeckoProject error LNK2001: unresolved external symbol "protected: virtual class nsSharedBufferHandle<char> const * __thiscall nsSharableCString::GetSharedBufferHandle(void)const " ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@@XZ)


SampleGeckoProject error LNK2001: unresolved external symbol "protected: virtual class nsSharedBufferHandle<char> const * __thiscall

What specific libraries are you linking against? It sounds like you are linking against the wrong version of the EmbedString lib. You should link to the following libraries:


nspr4.lib
plds4.lib
embedstring.lib
xpcomglue.lib

I hope this helps,

Doug Turner




Reply via email to