Re: New Embedding API

wiget <[email protected]>
Newsgroups gmane.comp.mozilla.devel.embedding
Organization http://groups.google.com
Message-ID <[email protected]>
On 14 Lut, 23:13, moz_embedder <[email protected]> wrote:
> I am taking my first steps into the new API documented athttps://wiki.mozilla.org/Embedding/NewApi.
> I am using Linux and GTK. libxulrunner-dev and all libs correctly
> installed. My GRE is registered properly.
> When I compile the example app from  "hg clonehttp://hg.mozilla.org/incubator/embedding/
> mozembed", I get an error I cannot resolve:
>
> In file included from ../../common/embed.cpp:60:
> /usr/include/xulrunner-1.9.2.13/nsNetUtil.h: In function ‘nsresult
> NS_MakeRandomInvalidURLString(nsCString_external&)’:
> /usr/include/xulrunner-1.9.2.13/nsNetUtil.h:1690: error: ‘struct nsID’
> has no member named ‘ToProvidedString’
>
> I only know it has something to do with whether XPCOM_GLUE_AVOID_NSPR
> is defined. If it is defined, the above function's definition is
> removed by the preprocessor in nsID.h
>
> However, if it is not defined than XPCOM_GLUE_USE_NSPR must be defined
> and then I have to link against nspr???? - guessing
>
> Is this a bug in xulrunner? Thanks in advance!

I think nsNetUtil.h is not embedding/XPCOM_GLUE friendly. I simple
commented out NS_MakeRandomInvalidURLString definition and
successfully compiled mozembed test application.

BTW incubator/embedding (aka New Embedding API) requires newer
xulrunner SDK (from http://ftp.mozilla.org/pub/mozilla.org/mozilla.org/xulrunner/nightly/latest-trunk/
)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.