goktan kantarcioglu wrote:
i'm trying to compile a xpcom program with #include <nsCOMPtr.h> #include <nsICookieManager.h> #include <nsCCookieManager.h> #include <nsICookie.h> #include <nsString.h> #include <nsIServiceManager.h>
and linker flags -lxpcom -lnspr4 but i couldn't link the program it gs,ves me lots of undefined reference to ..... errors.
Why are you #including nsCCookieManager.h? That is a private/internal header that you shouldn't need.
nsCCookieManager.h doesn't have anything but some #defines. it isn't going to really hurt much to include that. However, please note that it was removed from the tree during the 1.6 development cycle. It will not exist in mozilla 1.6 final. So, besides your program not compiling against 1.6, there isn't really that much to worry about ;-)
Thirdly, if you are writing a component/extension you probably shouldn't be using nsString. That class is frozen and the function imports and layout can change. Instead, use nsEmbedString which is statically linked.
Ben of course meant "nsString is NOT frozen..."
For more info on writing components for mozilla, please see: http://www.mozilla.org/projects/xpcom/book/cxc/html/index.html
It has much detail on nsEmbedString and other important things you should keep in mind.
Darin _______________________________________________ Mozilla-xpcom mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-xpcom
