Boost C++ Libraries: Ticket #2245: Compile error on HP-UX (PARISC) with gcc 4.2.1 https://svn.boost.org/trac10/ticket/2245 <p> I get the following error when compiling a 3rd party library (the webtoolkit <a class="ext-link" href="http://www.webtoolkit.eu/wt"><span class="icon">​</span>http://www.webtoolkit.eu/wt</a>) which uses boost/bind on HP-UX using the gcc 4.2.1: </p> <pre class="wiki">In file included from /home/mhufer/xgen-externals/install/HP-UX-gcc/boost-1.36.0/include/boost/bind.hpp:1571, from /home/mhufer/xgen-externals/webtoolkit/wt/src/Wt/WSignal:13, from /home/mhufer/xgen-externals/webtoolkit/wt/src/Wt/WResource:11, from /home/mhufer/xgen-externals/webtoolkit/wt/src/Wt/WWidget:10, from /home/mhufer/xgen-externals/webtoolkit/wt/src/Wt/WCssDecorationStyle:13, from /home/mhufer/xgen-externals/webtoolkit/wt/src/Wt/WCssStyleSheet:14, from /home/mhufer/xgen-externals/webtoolkit/wt/src/Wt/WApplication:15, from /home/mhufer/xgen-externals/webtoolkit/wt/src/http/../web/Configuration.h:15, from /home/mhufer/xgen-externals/webtoolkit/wt/src/http/RequestHandler.h:26, from /home/mhufer/xgen-externals/webtoolkit/wt/src/http/Connection.h:43, from /home/mhufer/xgen-externals/webtoolkit/wt/src/http/ConnectionManager.h:26, from /home/mhufer/xgen-externals/webtoolkit/wt/src/http/ConnectionManager.C:17: /home/mhufer/xgen-externals/install/HP-UX-gcc/boost-1.36.0/include/boost/bind/bind_mf2_cc.hpp:18: error: expected identifier before numeric constant /home/mhufer/xgen-externals/install/HP-UX-gcc/boost-1.36.0/include/boost/bind/bind_mf2_cc.hpp:18: error: expected '&gt;' before numeric constant /home/mhufer/xgen-externals/install/HP-UX-gcc/boost-1.36.0/include/boost/bind/bind_mf2_cc.hpp:20: error: 'R' was not declared in this scope /home/mhufer/xgen-externals/install/HP-UX-gcc/boost-1.36.0/include/boost/bind/bind_mf2_cc.hpp:20: error: 'T' was not declared in this scope /home/mhufer/xgen-externals/install/HP-UX-gcc/boost-1.36.0/include/boost/bind/bind_mf2_cc.hpp:20: error: template argument 1 is invalid /home/mhufer/xgen-externals/install/HP-UX-gcc/boost-1.36.0/include/boost/bind/bind_mf2_cc.hpp:20: error: template argument 2 is invalid /home/mhufer/xgen-externals/install/HP-UX-gcc/boost-1.36.0/include/boost/bind/bind_mf2_cc.hpp:20: error: 'A1' [..] </pre><p> It turns out that in somewhere else 'R2' is defined in this constellation. Since I don't know if and if yes where this define might be used I added a few lines before and after the template declarations. Before: </p> <pre class="wiki">#ifdef R2 #define __R2safe__ R2 #undef R2 #endif /* here follow the template declarations using R2 as a template class name*/ [..] #ifdef __R2safe__ #define R2 __R2safe__ #undef __R2safe__ #endif </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2245 Trac 1.4.3 Peter Dimov Wed, 17 Sep 2008 22:08:38 GMT status changed https://svn.boost.org/trac10/ticket/2245#comment:1 https://svn.boost.org/trac10/ticket/2245#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket Peter Dimov Wed, 17 Sep 2008 23:07:34 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2245#comment:2 https://svn.boost.org/trac10/ticket/2245#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</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/48840" title="Fix #2245.">[48840]</a>) Fix <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2245" title="#2245: Bugs: Compile error on HP-UX (PARISC) with gcc 4.2.1 (closed: fixed)">#2245</a>. </p> Ticket