Thanks BDS. I am using MOZILLA_INTERNAL_API linkage and got below linker error 
while creating my component using sdk 1.8.0.4. I have linked against xpcom.lib 
and xpcom_core.lib. 

nsTestModule.obj : error LNK2019: unresolved external symbol 
"__declspec(dllimport
) unsigned int __cdecl NS_NewGenericModule2(struct nsModuleInfo const *,class ns
IModule * *)" (__imp_?NS_NewGenericModule2@@YAIPBUnsModuleInfo@@PAPAVnsIModule@@
@Z) referenced in function _NSGetModule

Regards,
Ransion.

Benjamin Smedberg <[EMAIL PROTECTED]> wrote: ransion paul wrote:
> Hi,
> I have compiled moziila-source1.8b1 for windows and  got sdk from it. I have 
> created a simple xpcom component for xulrunner(1.8.0.1) application, using 
> this sdk. No problem with this, Component was registered successfully. 

The 1.8b1 SDK is very old. Unfortunately we didn't release an SDK for XR 
1.8.0.1, but we did get around to making one for 1.8.0.4 which should work 
with 1.8.0.1:

http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/1.8.0.4/sdk/

> If I use string related method (NS_ConvertUCS2toUTF8) in my component, it 
> fails to register. I tried regxpcom and touch .autoreg. My component is not 
> registered in compreg.dat. I got the error : Components.classes[cid] has no 
> properties .

I guess you're using MOZILLA_INTERNAL_API linkage? If you were using the 
glue, this probably wouldn't be an issue: 
http://developer.mozilla.org/en/docs/XPCOM_Glue

Although the glue doesn't provide all of the features that internal linkage 
provides, it can usually be made to do what you want if you're patient.

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


                
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ 
countries) for 2ยข/min or less.
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to