title: xpcom vs2010 compile C++ XPCOM for FF extension error
body: <p>I'v used header.py and typelib.py to produce .h and .xpt correctly.</p>
  
  <p><a href="https://github.com/mozilla-services/services-central-legacy/tree/master/xpcom/sample" rel="nofollow">https://github.com/mozilla-services/services-central-legacy/tree/master/xpcom/sample</a>  </p>
  
  <p>as a reference to compile in VC2010。</p>
  
  <p>These are the errors below:</p>
  
  <pre><code>:\xpcom\xulrunner-41.0.2.en-us.win32.sdk\xulrunner-sdk\include\nserror.h(119): error C2332: 'enum' : missing tag name
  1&gt;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&gt;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&gt;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&gt;          d:\program files\microsoft visual studio 10.0\vc\include\stdint.h(23) : see declaration of 'uint32_t'
  1&gt;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&gt;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&gt;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&gt;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&gt;d:\xpcom\xulrunner-41.0.2.en-us.win32.sdk\xulrunner-sdk\include\errorlist.h(11): error C2065: 'NS_ERROR_BASE' : undeclared identifier
  1&gt;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&gt;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&gt;d:\xpcom\xulrunner-41.0.2.en-us.win32.sdk\xulrunner-sdk\include\errorlist.h(13): error C2065: 'NS_ERROR_BASE' : undeclared identifier
  1&gt;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   ...............
  </code></pre>
  
  <p>project property has been set following the xpcom example instructions.</p>
  
  <p>No idea what happened. Really appreciate it if there is any help.</p>