Hi,
I'm trying to compile an xpcom component using the sdk. It all works well on linux, and it also worked on win32 for the bare plugin ( i.e. most of my code commented out, just few printf ).
When I add my code - I get link errors. The problem seems to be related to NS_Alloc symbol - the linker reports that the symbol can't be found.
Using nm on the .obj: U __imp__NS_Alloc
In the sdk, I found 2 libs defining the symbol:
nm /c/gecko-sdk/lib/xpcom.lib |grep NS_Alloc 00000000 T _NS_Alloc 00000000 I __imp__NS_Alloc
nm /c/gecko-sdk/lib/xpcomglue.lib |grep NS_Alloc
00000000 T _NS_Alloc
U _NS_Alloc
U _NS_AllocI am assuming it is correct to link against xpcomglue only ( otherwise NewModule2 can't be found ), since linking against both xpcom and xpcomglue fails with duplicated symbols. However only xpcom.lib define
the __imp__NS_Alloc. If I switch and link with it - NS_Alloc is linked, but NewGenericModule2 is not.
The link message is: LINK : warning LNK4049: locally defined symbol "_NS_Alloc" imported and after linking, NS_Alloc returns allways null.
Could someone clarify how this works ? I'm new to mozilla, and I found very little on the web.
Also - regxpcom.exe and xpidl in sdk ( and most other exe ) doesn't seem to work, but if I copy xpcom.dll, nspr4.dll, plc4.dll plds4.dll from firefox and mozilla ( mozilla 1.7.3 doesn't seem to include xpcom.dll ) - I got them working. Am I doing something wrong - should I set some env variables or is there some other way to run them or install the sdk ?
( I tried sdk from 1.7.3, 1.7.5 and latest nightly )
Costin _______________________________________________ Mozilla-xpcom mailing list [email protected] http://mail.mozilla.org/listinfo/mozilla-xpcom
