What lib in gecko 1.9.3 SDK do I link against using moz_xmalloc ()?

I am trying to associate the XPCOM extension with the 1.9.3a3pre SDK, and I get the following:

error LNK2001: unresolved external symbol _moz_xmalloc

So for which library do I need to link? the documentation does not say.

It is now on Windows, but I will need it to create it on Mac and Linux (32 bit / 64 bit).

Edit: now gratefully.

Edit: Update: It turns out that FF3.7 has been canceled. Therefore, I do not need to worry about this until FF4.

+2
source share
5 answers

define ' XPCOM_GLUE ' in the C ++ preprocessor definition property. It will fix the binding error.

+1
source

I have the same error and the link to mozalloc helps for this.

+4
source

Try defining MOZ_NO_MOZALLOC when compiling your extension, you will get a DLL that uses your CRT allocators. (Remember to use NS_ * allocators for XPCOM compatible memory.)

+1
source
  • Add MOZ_NO_MOZALLOC to the C ++ property → Preprocessor-> Definition.

  • Use xpcomglue_s_nomozalloc.lib instead of xpcomglue_s.lib in Linker-> Input-> Additional Dependencies

Everything will be good!

+1
source

reminder: another option that can cause this, even if everything else seems to be configured correctly in the project, points to the wrong libs folder - for example, the 32-bit version for a 64-bit build.

change v40 mozalloc.lib changed the name to mozglue.lib and has some additional methods.

change v41 mozglue.lib changed the name to mozcrt.lib

0
source

Source: https://habr.com/ru/post/1389244/


All Articles