Christopher Blizzard wrote:

@(none) wrote:

I built my own xpcom component and wanted to reuse the class ProfileStruct defined in nsProfileAccess.h.
For example:
ProfileStruct* profileItem = new ProfileStruct();
// using profileItem... //


I got an error about undefined reference to `ProfileStruct::ProfileStruct[in-charge]()' during compilation.

How can I fix this?


That's usually a sign that you either left out a real class definition for one of the pure virtual functions, or in the definition of your pure virtual interface (i.e. the component definition) you left off the = 0 after a function declaration. gcc gives strange errors. :)

--Chris

I tried to copy the way of using ProfileStruct from nsProfile.cpp. But somehow, it didn't work with my component. I think the ProfileStruct class doesn't have virtual functions.
Can this because I'm compiling my component into a shared library?


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

Reply via email to