It builds for me. I expect you either need a newer full tree of
sources to build it against or an older version of it to build in
your older tree.
John.
Patrick McHale wrote:
>
> Yes I have tried - This is the only example that I have not been able to get
> working.
> I downloaded the latest version using CVS successfully.
>
> cvs co mozilla/xpcom/sample
>
> I ran the "nmake /f makefile.win" as mentioned in the documentation but
> errors
> occured in the makefile process.
>
> The output from the make process being:
>
> Installing .\_xpidlgen\nsISample.h into ..\..\dist\include\nsISample.h
> +++ make: Creating typelib: .\_xpidlgen\sample.xpt
> +++ make: installing typelib '.\_xpidlgen\sample.xpt' to components
> directory
>
> Installing .\_xpidlgen\sample.xpt into
> ..\..\dist\WIN32_D.OBJ\bin\components\sample.xpt
> +++ make: Creating directory: WIN32_D.OBJ
>
> nsSample.cpp
> C:\mozilla\xpcom\sample\nsSample.cpp(65) : error C2259: 'nsISample' : cannot
> instantiate abstract class due to following members:
> ..\..\dist\include\nsISample.h(37) : see declaration of 'nsISample'
> C:\mozilla\xpcom\sample\nsSample.cpp(65) : warning C4259: 'unsigned int
> __stdcall
>
> nsISupports::QueryInterface(const struct nsID &,void ** )' : pure virtual
> function was not defined ..\..\dist\include\nsISupportsUtils.h(115) : see
> declaration of 'QueryInterface'
>
> C:\mozilla\xpcom\sample\nsSample.cpp(65) : warning C4259: 'unsigned long
> __stdcall nsISupports::AddRef(void)' : pure virtual function was not defined
> ..\..\dist\include\nsISupportsUtils.h(124) : see declaration of 'AddRef'
> C:\mozilla\xpcom\sample\nsSample.cpp(65) : warning C4259: 'unsigned long
> __stdcall
>
> nsISupports::Release(void)' : pure virtual function was not
> defined..\..\dist\include\nsISupportsUtils.h(133) : see declaration of
> 'Release'
> C:\mozilla\xpcom\sample\nsSample.cpp(65) : warning C4259: 'unsigned int
> __stdcall
>
> nsISample::GetValue(char ** )' : pure virtual function was not defined
> ..\..\dist\include\nsISample.h(43) : see declaration of 'GetValue'
> C:\mozilla\xpcom\sample\nsSample.cpp(65) : warning C4259: 'unsigned int
> __stdcall
>
> nsISample::SetValue(const char *)' : pure virtual function was not defined
> ..\..\dist\include\nsISample.h(44) : see declaration of 'SetValue'
> C:\mozilla\xpcom\sample\nsSample.cpp(65) : warning C4259: 'unsigned int
> __stdcall
>
> nsISample::WriteValue(const char *)' : pure virtual function was not defined
> ..\..\dist\include\nsISample.h(47) : see declaration of 'WriteValue'
> C:\mozilla\xpcom\sample\nsSample.cpp(65) : warning C4259: 'unsigned int
> __stdcall
>
> nsISample::Poke(const char *)' : pure virtual function was not defined
> ..\..\dist\include\nsISample.h(50) : see declaration of 'Poke'
>
> Haven't had a look at what is causing this yet - just wondered if you can
> confirm there is a problem with this example on the server. Have I used the
> CVS command correctly. I have had problems with the new version of the
> simplescriptable test downloaded by CVS also - has anything changed?. The
> Simple Scriptable test used to work in the past. I downloaded the 0.8.1
> version of Mozilla and the SimpleScriptable test example also doesn't work
> with that.
>
> Patrick McHale
>
> "Sean Echevarria" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Have you looked at the nsSample xpconnect src?
> > http://lxr.mozilla.org/seamonkey/source/xpcom/sample/
> > http://lxr.mozilla.org/seamonkey/source/xpcom/sample/nsSample.cpp
> > http://lxr.mozilla.org/seamonkey/source/xpcom/sample/xpconnect-sample.html
> >
> > On Thu, 19 Apr 2001 11:57:53 +1200, "Patrick McHale"
> > <mchalepNO#[EMAIL PROTECTED]> wrote:
> >
> > >Is there out there a simple example that compiles and runs - that shows
> > >exactly what is minimally needed to get access to C++ code from
> Javascript.
> > >All the examples I have come across have a lot of bells and whistles
> added
> > >in which confuse things. I would be very grateful if anyone knows of an
> > >example that does not create a window - but simple and can be implemented
> in
> > >C++ code to add XPConnect functionality. I would also be grateful if
> anyone
> > >knew of a hierachy chart which shows the tree involved in the Mozilla /
> > >XPConnect
> > >items.
> > >
> > >Patrick McHale
> > >
> > >
> > >
> >