Boost C++ Libraries: Ticket #1796: compile error when SDL_syswm.h (from sdl library) is included before foreach.hpp https://svn.boost.org/trac10/ticket/1796 <p> foreach won't compile when included after SDL_syswm.h </p> <p> the following two lines </p> <p> #include &lt;SDL_syswm.h&gt; #include &lt;boost/foreach.hpp&gt; </p> <p> will result in: </p> <hr /> <p> Compiling: wakka/sdl/MusicManager.cpp /usr/include/boost/foreach.hpp:223: Fehler: expected nested-name-specifier before »int« /usr/include/boost/foreach.hpp:223: Fehler: zwei oder mehr Datentypen in Deklaration von »parameter« Process terminated with status 1 (0 minutes, 1 seconds) 2 errors, 0 warnings </p> <p> when swapping the two includes it compiles without any problems </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1796 Trac 1.4.3 Marshall Clow Tue, 08 Apr 2008 20:54:36 GMT component changed; owner set https://svn.boost.org/trac10/ticket/1796#comment:1 https://svn.boost.org/trac10/ticket/1796#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Eric Niebler</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">foreach</span> </li> </ul> Ticket Eric Niebler Tue, 08 Apr 2008 21:05:57 GMT <link>https://svn.boost.org/trac10/ticket/1796#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1796#comment:2</guid> <description> <p> I don't know what SDL_syswm.h is. attach the preprocessed source code and tell me what compiler/version you're using. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 09 Apr 2008 20:01:00 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/1796#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1796#comment:3</guid> <description> <p> It's actually not a big problem, i just thought it might confuse someone else </p> <p> I am using the gcc compiler: "gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)" i am still trying to figure out how to get the preprocessed code (found out there is a -E option, but didin't find out how to add include directories on the command line) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Eric Niebler</dc:creator> <pubDate>Thu, 01 May 2008 21:11:41 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/1796#comment:4 https://svn.boost.org/trac10/ticket/1796#comment:4 <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">worksforme</span> </li> </ul> <p> Closing this as no repro. Feel free to reopen if you can attach the preprocessed source. </p> Ticket