Boost C++ Libraries: Ticket #4182: macro redefinition warnings https://svn.boost.org/trac10/ticket/4182 <pre class="wiki">#include &lt;boost/algorithm/string.hpp&gt; #include &lt;cstdint&gt; int main() { return 0; } 1&gt;------ Build started: Project: Test, Configuration: Debug Win32 ------ 1&gt; Test.cpp 1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(116): warning C4005: 'INT8_C' : macro redefinition 1&gt; c:\vc\include\boost\cstdint.hpp(376) : see previous definition of 'INT8_C' 1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(117): warning C4005: 'INT16_C' : macro redefinition 1&gt; c:\vc\include\boost\cstdint.hpp(377) : see previous definition of 'INT16_C' 1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(118): warning C4005: 'INT32_C' : macro redefinition 1&gt; c:\vc\include\boost\cstdint.hpp(378) : see previous definition of 'INT32_C' 1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(120): warning C4005: 'UINT8_C' : macro redefinition 1&gt; c:\vc\include\boost\cstdint.hpp(384) : see previous definition of 'UINT8_C' 1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(121): warning C4005: 'UINT16_C' : macro redefinition 1&gt; c:\vc\include\boost\cstdint.hpp(386) : see previous definition of 'UINT16_C' 1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(122): warning C4005: 'UINT32_C' : macro redefinition 1&gt; c:\vc\include\boost\cstdint.hpp(387) : see previous definition of 'UINT32_C' 1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(165): warning C4005: 'INT64_C' : macro redefinition 1&gt; c:\vc\include\boost\cstdint.hpp(379) : see previous definition of 'INT64_C' 1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(166): warning C4005: 'UINT64_C' : macro redefinition 1&gt; c:\vc\include\boost\cstdint.hpp(388) : see previous definition of 'UINT64_C' 1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(167): warning C4005: 'INTMAX_C' : macro redefinition 1&gt; c:\vc\include\boost\cstdint.hpp(389) : see previous definition of 'INTMAX_C' 1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(168): warning C4005: 'UINTMAX_C' : macro redefinition 1&gt; c:\vc\include\boost\cstdint.hpp(390) : see previous definition of 'UINTMAX_C' 1&gt; Test.vcxproj -&gt; C:\Users\Olaf\Documents\Visual Studio 2010\Projects\Test\Debug\Test.exe ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4182 Trac 1.4.3 anonymous Mon, 03 May 2010 21:58:20 GMT component changed; owner set https://svn.boost.org/trac10/ticket/4182#comment:1 https://svn.boost.org/trac10/ticket/4182#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Daryle Walker</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">integer</span> </li> </ul> <pre class="wiki">#include &lt;boost/cstdint.hpp&gt; #include &lt;cstdint&gt; </pre> Ticket Steven Watanabe Sat, 15 May 2010 02:17:26 GMT owner, component changed https://svn.boost.org/trac10/ticket/4182#comment:2 https://svn.boost.org/trac10/ticket/4182#comment:2 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Daryle Walker</span> to <span class="trac-author">John Maddock</span> </li> <li><strong>component</strong> <span class="trac-field-old">integer</span> → <span class="trac-field-new">config</span> </li> </ul> <p> Boost.Config needs to define BOOST_HAS_STDINT_H. </p> Ticket John Maddock Tue, 18 May 2010 12:02:25 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4182#comment:3 https://svn.boost.org/trac10/ticket/4182#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/62082" title="Add support for &lt;cstdint&gt; in VC10. Fixes #4182.">[62082]</a>) Add support for &lt;cstdint&gt; in VC10. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4182" title="#4182: Bugs: macro redefinition warnings (closed: fixed)">#4182</a>. </p> Ticket anonymous Sat, 13 Nov 2010 10:18:50 GMT <link>https://svn.boost.org/trac10/ticket/4182#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4182#comment:4</guid> <description> <p> There is another problem with this fix when intsafe.h from the windows sdk is included. Preventing BOOST_HAS_STDINT_H to get defined removes the warnings. </p> <pre class="wiki">1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(72): warning C4005: 'INT8_MIN' : macro redefinition 1&gt; c:\program files (x86)\microsoft sdks\windows\v7.0a\include\intsafe.h(144) : see previous definition of 'INT8_MIN' 1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(73): warning C4005: 'INT16_MIN' : macro redefinition 1&gt; c:\program files (x86)\microsoft sdks\windows\v7.0a\include\intsafe.h(146) : see previous definition of 'INT16_MIN' 1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(74): warning C4005: 'INT32_MIN' : macro redefinition 1&gt; c:\program files (x86)\microsoft sdks\windows\v7.0a\include\intsafe.h(148) : see previous definition of 'INT32_MIN' 1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(76): warning C4005: 'INT8_MAX' : macro redefinition 1&gt; c:\program files (x86)\microsoft sdks\windows\v7.0a\include\intsafe.h(167) : see previous definition of 'INT8_MAX' 1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(77): warning C4005: 'INT16_MAX' : macro redefinition 1&gt; c:\program files (x86)\microsoft sdks\windows\v7.0a\include\intsafe.h(171) : see previous definition of 'INT16_MAX' 1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(78): warning C4005: 'INT32_MAX' : macro redefinition 1&gt; c:\program files (x86)\microsoft sdks\windows\v7.0a\include\intsafe.h(176) : see previous definition of 'INT32_MAX' 1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(79): warning C4005: 'UINT8_MAX' : macro redefinition 1&gt; c:\program files (x86)\microsoft sdks\windows\v7.0a\include\intsafe.h(168) : see previous definition of 'UINT8_MAX' 1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(80): warning C4005: 'UINT16_MAX' : macro redefinition 1&gt; c:\program files (x86)\microsoft sdks\windows\v7.0a\include\intsafe.h(173) : see previous definition of 'UINT16_MAX' 1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(81): warning C4005: 'UINT32_MAX' : macro redefinition 1&gt; c:\program files (x86)\microsoft sdks\windows\v7.0a\include\intsafe.h(178) : see previous definition of 'UINT32_MAX' 1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(149): warning C4005: 'INT64_MIN' : macro redefinition 1&gt; c:\program files (x86)\microsoft sdks\windows\v7.0a\include\intsafe.h(152) : see previous definition of 'INT64_MIN' 1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(150): warning C4005: 'INT64_MAX' : macro redefinition 1&gt; c:\program files (x86)\microsoft sdks\windows\v7.0a\include\intsafe.h(184) : see previous definition of 'INT64_MAX' 1&gt;c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(151): warning C4005: 'UINT64_MAX' : macro redefinition 1&gt; c:\program files (x86)\microsoft sdks\windows\v7.0a\include\intsafe.h(189) : see previous definition of 'UINT64_MAX' </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Sat, 13 Nov 2010 12:08:05 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4182#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4182#comment:5</guid> <description> <p> This is nothing to do with us - the fact that two Microsoft headers conflict with each other is their issue not ours - sorry to be so blunt, but we should be able to use &lt;stdint.h&gt; without worrying what other headers may have been included. </p> <p> John Maddock. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Sat, 13 Nov 2010 16:01:24 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4182#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4182#comment:6</guid> <description> <p> True. Do you have a snippet to reproduce this issue so it can be reported to MS? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Sat, 13 Nov 2010 16:56:21 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4182#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4182#comment:7</guid> <description> <p> This: </p> <pre class="wiki">#include &lt;intsafe.h&gt; #include &lt;stdint.h&gt; </pre> </description> <category>Ticket</category> </item> </channel> </rss>