Closed
Bug 951984
Opened 11 years ago
Closed 11 years ago
mozilla/Char16.h(36): error C2371: 'char16_t' :
Categories
(Core :: MFBT, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: mohd.rozi.zafar, Unassigned)
References
Details
Attachments
(2 files)
670 bytes,
patch
|
Details | Diff | Splinter Review | |
1.13 KB,
patch
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36
Steps to reproduce:
Download latest xulrunner (27 beta 2) :
http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/27.0b2/sdk/xulrunner-27.0b2.en-US.win32.sdk.zip
Actual results:
Build started 12/19/2013 1:05:57 PM.
InitializeBuildStatus:
Touching "C:\project\src\Release\Output\WebPlugin.unsuccessfulbuild".
ClCompile:
stdafx.cpp
c:\project\gecko-sdk-win32-27.0\include\mozilla/Char16.h(36): error C2371: 'char16_t' : redefinition; different basic types
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\yvals.h(576) : see declaration of 'char16_t'
c:\project\gecko-sdk-win32-27.0\include\nsError.h(137): warning C4480: nonstandard extension used: specifying underlying type for enum 'tag_nsresult'
c:\project\gecko-sdk-win32-27.0\include\nsError.h(235): warning C4800: 'uint32_t' : forcing value to bool 'true' or 'false' (performance warning)
c:\project\gecko-sdk-win32-27.0\include\nsStringAPI.h(1079): error C3861: 'char16_t': identifier not found
stdafx.cpp(233): warning C4130: '!=' : logical operation on address of string constant
stdafx.cpp(283): warning C4130: '!=' : logical operation on address of string constant
stdafx.cpp(285): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
stdafx.cpp(306): warning C4130: '!=' : logical operation on address of string constant
Build FAILED.
Expected results:
Build should compile successful. Previous release was compiled OK (Xulrunner 26).
Severity: normal → major
OS: All → Windows 7
Hardware: All → x86_64
Comment 1•11 years ago
|
||
(In reply to Mohd Rozi from comment #0)
> User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML,
> like Gecko) Chrome/31.0.1650.63 Safari/537.36
>
> Steps to reproduce:
>
> Download latest xulrunner (27 beta 2) :
> http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/27.0b2/sdk/
> xulrunner-27.0b2.en-US.win32.sdk.zip
>
>
> Actual results:
>
> Build started 12/19/2013 1:05:57 PM.
> InitializeBuildStatus:
> Touching "C:\project\src\Release\Output\WebPlugin.unsuccessfulbuild".
> ClCompile:
> stdafx.cpp
> c:\project\gecko-sdk-win32-27.0\include\mozilla/Char16.h(36): error C2371:
> 'char16_t' : redefinition; different basic types
> C:\Program Files (x86)\Microsoft Visual Studio
> 10.0\VC\include\yvals.h(576) : see declaration of 'char16_t'
> c:\project\gecko-sdk-win32-27.0\include\nsError.h(137): warning C4480:
> nonstandard extension used: specifying underlying type for enum
> 'tag_nsresult'
> c:\project\gecko-sdk-win32-27.0\include\nsError.h(235): warning C4800:
> 'uint32_t' : forcing value to bool 'true' or 'false' (performance warning)
> c:\project\gecko-sdk-win32-27.0\include\nsStringAPI.h(1079): error C3861:
> 'char16_t': identifier not found
> stdafx.cpp(233): warning C4130: '!=' : logical operation on address of
> string constant
> stdafx.cpp(283): warning C4130: '!=' : logical operation on address of
> string constant
> stdafx.cpp(285): warning C4244: '=' : conversion from 'double' to 'float',
> possible loss of data
> stdafx.cpp(306): warning C4130: '!=' : logical operation on address of
> string constant
>
> Build FAILED.
>
>
> Expected results:
>
> Build should compile successful. Previous release was compiled OK (Xulrunner
> 26).
Is this compiling your plugin or application using xulrunner?
I created a simple workaround patch (workaround.diff), at least my progam can compile successfully using Visual Studio 2010. I just revert some code section to previous version (xulrunner 26). But we still need a proper fix for this issue.
Updated•11 years ago
|
Component: XULRunner → MFBT
Product: Toolkit → Core
Comment 4•11 years ago
|
||
Can you please test this with the mozilla-central code? I remember fixing something like this a while ago, perhaps that patch was not backported to the Firefox 27 branch?
Hi Akhgari, sorry for the late reply. I tested using http://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly/latest-mozilla-central/xulrunner-29.0a1.en-US.win32.sdk.zip, still failing :
error C2371: 'char16_t' : redefinition; different basic types
Comment 7•11 years ago
|
||
Oh, I bet I know where the problem comes from.
In Mozilla code, we force-include mozilla/Char16.h before all other headers in every .cpp file that we compile, which ensures that the char16_t type is available everywhere. Can you please modify your plugin code to ensure that mozilla/Char16.h is included as the first header in every .cpp file? (Note that including it after things like windows.h will cause compilation errors similar to what you are seeing here.)
Comment 8•11 years ago
|
||
Shouldn't he already be picking this up through mozilla-config.h, which should be part of the CXXFLAGS equivalent on Windows? Or is there no such equivalent on Windows?
Comment 9•11 years ago
|
||
(In reply to comment #8)
> Shouldn't he already be picking this up through mozilla-config.h, which should
> be part of the CXXFLAGS equivalent on Windows? Or is there no such equivalent
> on Windows?
I think that depends on the build system. If the plugin is built using our build system then things should work out of the box.
Reporter | ||
Comment 10•11 years ago
|
||
@Ehsan Akhgari, Perfect! I put #include <mozilla/Char16.h> in my stdafx.h and everything is OK :)
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
Comment 11•11 years ago
|
||
SDK : xulrunner-28.0.1.en-US.win32.sdk, xulrunner-29.0.1.en-US.win32.sdk
VS : VS2005 SP1
OS : windows 7 64bit ServicePack 1
I put #include <mozilla/Char16.h> in my stdafx.h and everything is OK
but, error C3861: 'CreateEvent'; undefined (atlbase.h)
Help me......
You need to log in
before you can comment on or make changes to this bug.
Description
•