Hi,

I am trying to build my first XPCOM sample in CDT/Cygwin and I am getting
the following error at compilation:

--------------------------------------------------------------------------
**** Incremental build of configuration Debug for project SampleXPCOM ****

make -k all 
Building file: ../MyComponent.cpp
Invoking: GCC C++ Compiler
g++ -ID:\PROJETS\MOZILLA\gecko-sdk-i586-pc-msvc\gecko-sdk\include -O0 -g3
-Wall -c -fmessage-length=0 -oMyComponent.o ../MyComponent.cpp
In file included from
D:/PROJETS/MOZILLA/gecko-sdk-i586-pc-msvc/gecko-sdk/include/nsISupports.h:12
2,
                 from ../IMyComponent.h:10,
                 from ../MyComponent.h:4,
                 from ../MyComponent.cpp:1:
D:/PROJETS/MOZILLA/gecko-sdk-i586-pc-msvc/gecko-sdk/include/nsISupportsUtils
.h:207: error: an explicit specialization must be preceded by 'template <>'
make: *** [MyComponent.o] Error 1
Building file: ../MyComponentModule.cpp
Invoking: GCC C++ Compiler
g++ -ID:\PROJETS\MOZILLA\gecko-sdk-i586-pc-msvc\gecko-sdk\include -O0 -g3
-Wall -c -fmessage-length=0 -oMyComponentModule.o ../MyComponentModule.cpp
In file included from
D:/PROJETS/MOZILLA/gecko-sdk-i586-pc-msvc/gecko-sdk/include/nsISupports.h:12
2,
                 from
D:/PROJETS/MOZILLA/gecko-sdk-i586-pc-msvc/gecko-sdk/include/nsIFactory.h:10,
                 from
D:/PROJETS/MOZILLA/gecko-sdk-i586-pc-msvc/gecko-sdk/include/nsIGenericFactor
y.h:41,
                 from ../MyComponentModule.cpp:1:
D:/PROJETS/MOZILLA/gecko-sdk-i586-pc-msvc/gecko-sdk/include/nsISupportsUtils
.h:207: error: an explicit specialization must be preceded by 'template <>'
make: *** [MyComponentModule.o] Error 1
make: Target `all' not remade because of errors.
Build complete for project SampleXPCOM
--------------------------------------------------------------------------

It seems that the header files (nsISupports.h and nsISupportsUtils.h) of the
gecko SDK have a template definition problem. I am not an expert in C++ so
maybe the problem is somewhere else but what should I do to avoid this
pitfalls?

Thanks in advance for your help,

Best Regards,

Jean-Guillaume LALANNE

Ps: the sample XPCOM is in attachment.

Attachment: SampleXPCOM.rar
Description: Binary data

_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to