Ian macLean wrote:
>
> Hi,
> I've build a c++ xpcom component which builds and runs fine in my current
> mozilla tree ( latest from cvs ). However when I copy my dll and xpt into
> the components directory of a mozilla nightly ( binary download ) I get the
> following error when running regxpcom :
>
> "The procedure entry point NS_CurrentThread could not be located in the
> dynamic link library xpcom.dll"
>
> now dumpbin tells me that this symbol exists in an xpcom I build from source
> but not in the xpcom that ships with a mozilla nightly. If I build from the
> source of the same nightly it works fine. Does anyone have any ideas ?
>
> Thanks
>
> Ian
[I'm assuming you are using windows - the build environment
specifics are different for the other platforms, but the basic
issues are the same.]
Your tree is a debug build (you have MOZ_DEBUG=1 in your
environment). The nightlies are non-DEBUG (aka 'optimized' or
'release'). For various reasons components built one way are not
compatible with components built the other. You are running into
the first aspect of that incompatibility: NS_CurrentThread is
only exported (and used) in DEBUG builds:
http://lxr.mozilla.org/seamonkey/source/xpcom/base/nsISupportsUtils.h#159
Try setting "set MOZ_DEBUG=" in your environment and rebuild.
This will rebuild your entire tree non-DEBUG - you'll get
parallel binary output directories. If you are low on space then
you'll want to clobber your debug output first.
You can build a optimized build with symbols (to allow you to use
the debugger on your code w/o the "#ifdef DEBUG" code being
compiled) by setting the following before you build:
set MOZ_DEBUG=
set MOZ_PROFILE=1
set MOZ_PURIFY=1
John.