NSGlue_Warning error message

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

NSGlue_Warning error message

oliver-14
I have created a Win32/MSVC 2003 application that is a slightly
modified version of winEmbed from branch 1.8 code. I replaced the calls
to NS_InitEmbedding/NS_TermEmbedding with the XRE equivalents because
ultimately I want to make this a XUL application and added the relevant
includes and libs to the project. My debug version works as expected
but the opt (release) version pops up a dialog that says "The procedure
entry point NSGlue_Warning could not be located in the dynamic link
library xul.dll".

The regular version of winEmbed I build using the makefile supplied
works properly.

Can anyone suggest why the release version is broken (and why the debug
one isn't)?

Oli.

_______________________________________________
dev-builds mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-builds
Reply | Threaded
Open this post in threaded view
|

Re: NSGlue_Warning error message

Benjamin Smedberg
oliver wrote:
> I have created a Win32/MSVC 2003 application that is a slightly
> modified version of winEmbed from branch 1.8 code. I replaced the calls
> to NS_InitEmbedding/NS_TermEmbedding with the XRE equivalents because
> ultimately I want to make this a XUL application and added the relevant
> includes and libs to the project. My debug version works as expected
> but the opt (release) version pops up a dialog that says "The procedure
> entry point NSGlue_Warning could not be located in the dynamic link
> library xul.dll".

Which linking strategy are you using? The NSGlue_Warning symbol is typically
provided by either xpcomglue_s.lib or xpcomglue.lib depending on which
linking strategy you've selected, and should only be imported from xul.dll
if you're using MOZILLA_INTERNAL_API linkage, which is strongly discouraged.

--BDS

_______________________________________________
dev-builds mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-builds
Reply | Threaded
Open this post in threaded view
|

Re: NSGlue_Warning error message

oliver-14
I have defined MOZILLA_INTERNAL_API - otherwise, I get this compilation
error:

e:\mozilla.branch18\obj_debug\dist\include\string\nsTAString.h(41) :
fatal error C1189: #error :  Cannot use internal string classes without
MOZILLA_INTERNAL_API defined. Use the frozen header nsStringAPI.h
instead.

I haven't gone through winEmbed.cpp to find which of the header being
used is triggering this.

I looked at this page - http://developer.mozilla.org/en/docs/XPCOM_Glue
- and I believe I want the " Using Frozen linkage (dependent on
xpcom.dll)" configuration.

Given this, which preprocessor #defines and libraries should I use to
build the winEmbed project in MSVC as a libxul based application (using
XRE_{Init/Terminate}Embedding instead of NS_{Init/Terminate}Embedding)?

Oli.

_______________________________________________
dev-builds mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-builds
Reply | Threaded
Open this post in threaded view
|

Re: NSGlue_Warning error message

Benjamin Smedberg
oliver wrote:

> I have defined MOZILLA_INTERNAL_API - otherwise, I get this compilation
> error:
>
> e:\mozilla.branch18\obj_debug\dist\include\string\nsTAString.h(41) :
> fatal error C1189: #error :  Cannot use internal string classes without
> MOZILLA_INTERNAL_API defined. Use the frozen header nsStringAPI.h
> instead.
>
> I haven't gone through winEmbed.cpp to find which of the header being
> used is triggering this.

As you may have noticed, I fixed the header files appropriately on the
trunk, but I am able to backport my changes to the 1.8 branch. You are stuck
not using headers that include nsString if you want to use frozen linkage.

--BDS
_______________________________________________
dev-builds mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-builds
Reply | Threaded
Open this post in threaded view
|

Re: NSGlue_Warning error message

Justin Wood (Callek)-2
Benjamin Smedberg wrote:

> oliver wrote:
>> I have defined MOZILLA_INTERNAL_API - otherwise, I get this compilation
>> error:
>>
>> e:\mozilla.branch18\obj_debug\dist\include\string\nsTAString.h(41) :
>> fatal error C1189: #error :  Cannot use internal string classes without
>> MOZILLA_INTERNAL_API defined. Use the frozen header nsStringAPI.h
>> instead.
>>
>> I haven't gone through winEmbed.cpp to find which of the header being
>> used is triggering this.
>
> As you may have noticed, I fixed the header files appropriately on the
> trunk, but I am able to backport my changes to the 1.8 branch. You are
> stuck not using headers that include nsString if you want to use frozen
> linkage.
>
> --BDS

With the caveat that I don't currently, nor plan to build an embedding
version of the app, I do not see why backporting those changes would be
bad at all.

~Justin Wood (Callek)
_______________________________________________
dev-builds mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-builds