I need to set up a couple of functions in nsISupports derived class.

class myILogger : public nsISupports {

 // some xpcom functions that I will access from javascript

};

class myLogger : public myILogger {

// cut out the XPCOM macros here

public:
        static void D( const char* format, ... );
};


void myLogger::D( const char* format, ... ) {
        // do some stuff with standard static libraries...      
}

Assuming that I didn't mistype anything this compiles fine and
gets put into libmyLogger.so, myLogger.xpt, etc..

Here is the problem:

>From within another XPCOM componant I am trying to make the following
call:

myLogger::D( "Hello %s\n", "World" );

And that compiles fine too.

When I run the application loads the calling component, I get a loading
error:

error in loading .... libmyLogger.so: undefined symbol: D__13myLoggerPCce
which I assume is the mangled name of myLogger::D

How can i provide this functionality under XPCOM?  What am I doing wrong 
here?

Thanks.

Reply via email to