I am attempting to build the sample XPCOM from the website:
http://www.iosart.com/firefox/xpcom/. It compiles, links, and executes in
Firefox 1.5 on a Windows XP platform, using the Gecko 1.8b1 libraries. On
Linux (Fedora Core 4), it compiles and links but an attempt to execute
obj = Components.classes[cid].createInstance();
TypeError: Components.classes[cid] has no properties.
xpti.dat contains references to the component; compreg.dat does not. I
have run ldd on the shared library and there appear to be no outstanding
dependencies. This XPCOM was built with an earlier version of the Gecko
library, and ran successfully under Firefox 1.07 on the same system.
Here is the makefile.
CXX = c++
CPPFLAGS += -fno-rtti \
# Change this to point at your Gecko SDK directory.
GECKO_SDK_PATH = gecko-sdk-linux-1.8b1
# GCC only define which allows us to not have to #include mozilla-config
# in every .cpp file. If your not using GCC remove this line and add
# #include "mozilla-config.h" to each of your .cpp files.
GECKO_CONFIG_INCLUDE = -include mozilla-config.h