xpcom vs2010为FF扩展错误编译C ++ XPCOM

时间:2015-12-17 07:57:07

标签: visual-c++ xpcom

我使用header.py和typelib.py正确生成.h和.xpt。

https://github.com/mozilla-services/services-central-legacy/tree/master/xpcom/sample

作为VC2010中编译的参考。

以下是以下错误:

:\xpcom\xulrunner-41.0.2.en-us.win32.sdk\xulrunner-sdk\include\nserror.h(119): error C2332: 'enum' : missing tag name
1>d:\xpcom\xulrunner-41.0.2.en-us.win32.sdk\xulrunner-sdk\include\nserror.h(119): error C2236: unexpected 'class' 'nsresult'. Did you forget a ';'?
1>d:\xpcom\xulrunner-41.0.2.en-us.win32.sdk\xulrunner-sdk\include\nserror.h(119): error C3381: 'nsresult' : assembly access specifiers are only available in code compiled with a /clr option
1>d:\xpcom\xulrunner-41.0.2.en-us.win32.sdk\xulrunner-sdk\include\nserror.h(120): error C2516: 'uint32_t' : is not a legal base class
1>          d:\program files\microsoft visual studio 10.0\vc\include\stdint.h(23) : see declaration of 'uint32_t'
1>d:\xpcom\xulrunner-41.0.2.en-us.win32.sdk\xulrunner-sdk\include\errorlist.h(4): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\xpcom\xulrunner-41.0.2.en-us.win32.sdk\xulrunner-sdk\include\errorlist.h(4): error C2864: 'nsresult::NS_OK' : only static const integral data members can be initialized within a class
1>d:\xpcom\xulrunner-41.0.2.en-us.win32.sdk\xulrunner-sdk\include\errorlist.h(9): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\xpcom\xulrunner-41.0.2.en-us.win32.sdk\xulrunner-sdk\include\errorlist.h(9): error C2864: 'nsresult::NS_ERROR_BASE' : only static const integral data members can be initialized within a class
1>d:\xpcom\xulrunner-41.0.2.en-us.win32.sdk\xulrunner-sdk\include\errorlist.h(11): error C2065: 'NS_ERROR_BASE' : undeclared identifier
1>d:\xpcom\xulrunner-41.0.2.en-us.win32.sdk\xulrunner-sdk\include\errorlist.h(11): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\xpcom\xulrunner-41.0.2.en-us.win32.sdk\xulrunner-sdk\include\errorlist.h(11): error C2864: 'nsresult::NS_ERROR_NOT_INITIALIZED' : only static const integral data members can be initialized within a class
1>d:\xpcom\xulrunner-41.0.2.en-us.win32.sdk\xulrunner-sdk\include\errorlist.h(13): error C2065: 'NS_ERROR_BASE' : undeclared identifier
1>d:\xpcom\xulrunner-41.0.2.en-us.win32.sdk\xulrunner-sdk\include\errorlist.h(13): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   ...............
已按照xpcom示例说明设置

项目属性。

不知道发生了什么。如果有任何帮助,真的很感激。

0 个答案:

没有答案