Hello everybody!

I try to compile, in Linux, the weblock2.cpp example from
http://www.mozilla.org/projects/xpcom/book/cxc/html/tools.html#1011463

In this file, I include at first th next file:
#include "mozilla-config.h"

I use the Makefile provided by this URL:
http://www.mozilla.org/projects/xpcom/book/cxc/html/appA.html#1001651

Where I change the apropiate parameters of it, like GECKO_SDK_PATH,
Mozshim.so and MozShim.cpp for weblock2.so and weblock2.cpp
respectively.

When I run make from linux, this is the result:

c++  -o MozShim.so -DXPCOM_GLUE -DMOZILLA_STRICT_API -I
/home/evera/mozilla-sdk/ -I /home/evera/mozilla-sdk//xpcom/include -I
/home/evera/mozilla-sdk//nspr/include -I
/home/evera/mozilla-sdk//string/include -I
/home/evera/mozilla-sdk//embedstring/include -L
/home/evera/mozilla-sdk//xpcom/bin -lxpcomglue -L
/home/evera/mozilla-sdk//nspr/bin -lnspr4 -L
/home/evera/mozilla-sdk//nspr/bin -lplds4 -L
/home/evera/mozilla-sdk//embedstring/bin/ -lembedstring -fno-rtti
-fno-exceptions -shared  MozShim.cpp
MozShim.cpp:14: ANSI C++ forbids declaration `NS_DECL_ISUPPORTS' with
no type
MozShim.cpp:14: missing ';' before right brace
MozShim.cpp: In method `Sample::Sample()':
MozShim.cpp:20: implicit declaration of function `int
NS_INIT_ISUPPORTS(...)'
MozShim.cpp: At top level:
MozShim.cpp:26: ANSI C++ forbids declaration `NS_IMPL_ISUPPORTS' with
no type
MozShim.cpp:26: cannot declare parameter `{anon}' to be of type
`Sample'
MozShim.cpp:26:   since the following virtual functions are abstract:
/home/evera/mozilla-sdk/xpcom/include/nsISupportsBase.h:97:    
nsresult nsISupports::QueryInterface(const nsIID &, void **)
/home/evera/mozilla-sdk/xpcom/include/nsISupportsBase.h:105:   
nsrefcnt nsISupports::AddRef()
/home/evera/mozilla-sdk/xpcom/include/nsISupportsBase.h:114:   
nsrefcnt nsISupports::Release()
MozShim.cpp:26: cannot declare parameter `{anon}' to be of type
`nsISupports'
MozShim.cpp:26:   since the following virtual functions are abstract:
/home/evera/mozilla-sdk/xpcom/include/nsISupportsBase.h:114:   
nsrefcnt nsISupports::Release()
/home/evera/mozilla-sdk/xpcom/include/nsISupportsBase.h:105:   
nsrefcnt nsISupports::AddRef()
/home/evera/mozilla-sdk/xpcom/include/nsISupportsBase.h:97:    
nsresult nsISupports::QueryInterface(const nsIID &, void **)
MozShim.cpp: In function `nsresult SampleConstructor(nsISupports *,
const nsIID &, void **)':
MozShim.cpp:28: parse error before `)'
MozShim.cpp:28: implicit declaration of function `int
NS_NEWXPCOM(...)'
MozShim.cpp:28: implicit declaration of function `int NS_ADDREF(...)'
MozShim.cpp:28: implicit declaration of function `int NS_RELEASE(...)'
MozShim.cpp: At top level:
MozShim.cpp:36: parse error before `}'
make: *** [build] Error 1


Why are these errors? Please, help me!

Thanks.
_______________________________________________
Mozilla-xpcom mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to