Closed
Bug 890211
Opened 10 years ago
Closed 10 years ago
WebRTC fail to compile using Visual Studio 2013
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: xavier114fch, Unassigned)
References
Details
Attachments
(2 files)
7.50 KB,
text/plain
|
Details | |
1.96 KB,
patch
|
Details | Diff | Splinter Review |
There are 2 sets of issues: 1) std::max and std::min needs include <algorithm> to compile. 2) Several errors when MediaPipeline.cpp is compiled: 71:18.77 C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\inttypes .h(237) : error C2084: function '__int64 abs(__int64) throw()' already has a bod y 71:18.77 71:18.77 C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\ stdlib.h(501) : see previous definition of 'abs' 71:18.77 71:18.77 C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\inttypes .h(242) : error C2556: 'imaxdiv_t div(intmax_t,intmax_t)' : overloaded function differs only by return type from 'lldiv_t div(__int64,__int64) throw()' 71:18.77 71:18.77 C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\ stdlib.h(509) : see declaration of 'div' 71:18.77 71:18.79 C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\inttypes .h(242) : error C2371: 'div' : redefinition; different basic types 71:18.79 71:18.79 C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\ stdlib.h(509) : see declaration of 'div'
Reporter | ||
Comment 1•10 years ago
|
||
This is the patch to fix issue 1 I can discover so far.
Comment 2•10 years ago
|
||
(In reply to Xavier Fung from comment #0) > Created attachment 771257 [details] > Error log for MediaPipeline.cpp > > There are 2 sets of issues: > 1) std::max and std::min needs include <algorithm> to compile. > 2) Several errors when MediaPipeline.cpp is compiled: > > 71:18.77 C:\Program Files (x86)\Microsoft Visual Studio > 12.0\VC\INCLUDE\inttypes > .h(237) : error C2084: function '__int64 abs(__int64) throw()' already has a > bod > y > 71:18.77 > 71:18.77 C:\Program Files (x86)\Microsoft Visual Studio > 12.0\VC\INCLUDE\ > stdlib.h(501) : see previous definition of 'abs' > 71:18.77 > 71:18.77 C:\Program Files (x86)\Microsoft Visual Studio > 12.0\VC\INCLUDE\inttypes > .h(242) : error C2556: 'imaxdiv_t div(intmax_t,intmax_t)' : overloaded > function > differs only by return type from 'lldiv_t div(__int64,__int64) throw()' > 71:18.77 > 71:18.77 C:\Program Files (x86)\Microsoft Visual Studio > 12.0\VC\INCLUDE\ > stdlib.h(509) : see declaration of 'div' > 71:18.77 > 71:18.79 C:\Program Files (x86)\Microsoft Visual Studio > 12.0\VC\INCLUDE\inttypes > .h(242) : error C2371: 'div' : redefinition; different basic types > 71:18.79 > 71:18.79 C:\Program Files (x86)\Microsoft Visual Studio > 12.0\VC\INCLUDE\ > stdlib.h(509) : see declaration of 'div' This is a bug of VS2013. I already file this to https://connect.microsoft.com/VisualStudio/feedback/details/792397/.
Comment 4•10 years ago
|
||
remove the including of inttypes.h, then this is fixed.
(In reply to zhoubcfan from comment #4) > remove the including of inttypes.h, then this is fixed. The <algorithm> changes are still needed. Can we get this patch reviewed and checked in?
Comment 6•10 years ago
|
||
VS 2013 RTM can compile WebRTC without any changes.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
Well that's strange. In general, <algorithm> is still needed for min/max (for example, bug 892859 still stands). And I haven't updated my local code, so it wasn't a change on the WebRTC side. So I guess that means that somehow <algorithm> got pulled in by some internal VC header changes. But anyway, I can confirm that VS2013 RTM can compile WebRTC without this patch.
Updated•5 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•