<html><body>
<p>Thanks for pointing out the mistake.<br>
<br>
<img width="16" height="16" src="cid:1__=0ABBFFC9DFA609918f9e8a93df938@us.ibm.com" border="0" alt="Inactive hide details for Michael Hennebry ---02/11/2009 12:52:28 AM---On Tue, 10 Feb 2009, Kish Shen wrote:"><font color="#424282">Michael Hennebry ---02/11/2009 12:52:28 AM---On Tue, 10 Feb 2009, Kish Shen wrote:</font><br>
<br>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBFFC9DFA609918f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2" color="#5F5F5F">From:</font></td><td width="100%"><img width="1" height="1" src="cid:2__=0ABBFFC9DFA609918f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">Michael Hennebry &lt;hennebry@web.cs.ndsu.nodak.edu&gt;</font></td></tr>

<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBFFC9DFA609918f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2" color="#5F5F5F">To:</font></td><td width="100%"><img width="1" height="1" src="cid:2__=0ABBFFC9DFA609918f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">Kish Shen &lt;kisshen@cisco.com&gt;</font></td></tr>

<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBFFC9DFA609918f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2" color="#5F5F5F">Cc:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="cid:2__=0ABBFFC9DFA609918f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">clp@list.coin-or.org</font></td></tr>

<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBFFC9DFA609918f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2" color="#5F5F5F">Date:</font></td><td width="100%"><img width="1" height="1" src="cid:2__=0ABBFFC9DFA609918f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">02/11/2009 12:52 AM</font></td></tr>

<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBFFC9DFA609918f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2" color="#5F5F5F">Subject:</font></td><td width="100%"><img width="1" height="1" src="cid:2__=0ABBFFC9DFA609918f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">Re: [Clp] problems compiling Clp with gcc/g++ 3.3.5</font></td></tr>
</table>
<hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br>
<br>
<br>
<tt>On Tue, 10 Feb 2009, Kish Shen wrote:<br>
<br>
&gt; As I mentioned in my previous post, I was unable to compile the latest<br>
&gt; trunk branch Cbc, and the problem seem to occur when compiling Clp. I<br>
&gt; have since tried compiling Cbc on a x86-64 Linux machine, which has<br>
&gt; gcc 4.1, and this compiled without the problem, so I assume it is an<br>
&gt; issue with the gcc version.<br>
<br>
Though the message isn't very good, I think the code is in error.<br>
<br>
&gt; The problem occurs when trying to compile unitTest.cpp, apparently in<br>
&gt; line 1978 (see the partial output from the compiler at the end of this<br>
&gt; message). Line 1978 is the line starting with blockName in the following:<br>
&gt;<br>
&gt; &nbsp; &nbsp; CoinStructuredModel structured;<br>
&gt; &nbsp; &nbsp; int numberBlocks=5;<br>
&gt; &nbsp; &nbsp; for (int i=0;i&lt;numberBlocks;i++) {<br>
&gt; &nbsp; &nbsp; &nbsp; std::string topName=&quot;row_master&quot;;<br>
&gt; &nbsp; &nbsp; &nbsp; std::string blockName=&quot;block_&quot;;<br>
&gt; &nbsp; &nbsp; &nbsp; blockName.append(1,'a'+i);<br>
<br>
'a'+1 is an int, but is probably intended to be a char.<br>
append is rather overloaded.<br>
I think that int to char is not one of the<br>
allowed conversions for overload resolution.<br>
None of the non-template methods matched,<br>
so the compiler inferred you wanted a template method,<br>
but that didn't match either.<br>
As the last thing tried, it got mentioned in the error message.<br>
<br>
An explicit cast should fix it.<br>
<br>
&gt; &nbsp; &nbsp; &nbsp; structured.addBlock(topName,blockName,top);<br>
&gt; &nbsp; &nbsp; &nbsp; structured.addBlock(blockName,blockName,sub);<br>
&gt; &nbsp; &nbsp; }<br>
&gt;<br>
&gt; This code is not in the unitTest.cpp of the Cbc I downloaded on<br>
&gt; 2008-11-04, which I was able to compile with gcc 3.3.<br>
&gt;<br>
&gt; I am wondering if it is possible to work around this problem? gcc 3<br>
&gt; is still not that old -- two different systems I have access to, and<br>
&gt; which were both set up about 3 to 4 years ago, both have gcc 3 (3.3 and<br>
&gt; 3.2) as the gcc compiler. I am not in a position to replace the gcc used<br>
&gt; on these system, and in any case, it would be perferable to be able to<br>
&gt; compile with gcc 3, because the binaries (we distribute in both binary<br>
&gt; and source forms) will run on more machines.<br>
&gt;<br>
&gt; Thanks and cheers,<br>
&gt;<br>
&gt; Kish<br>
&gt; ======<br>
&gt;<br>
&gt; The (start of) error output by g++ when compiling unitTest.cpp:<br>
&gt;<br>
&gt;<br>
&gt; if g++ -DHAVE_CONFIG_H -DUFL_BARRIER -I. -I`echo ../../../Clp/src`<br>
&gt; -I../inc &nbsp;-I`echo /homes/kish/CoinCbcClp20090210/CoinUtils/src` -I`echo<br>
&gt; /homes/kish/CoinCbcClp20090210/i386_linux/Clp/../CoinUtils/inc` &nbsp; -O2<br>
&gt; -fno-omit-frame-pointer -momit-leaf-frame-pointer -DNDEBUG &nbsp; -MT<br>
&gt; unitTest.o -MD -MP -MF &quot;.deps/unitTest.Tpo&quot; -c -o unitTest.o<br>
&gt; ../../../Clp/src/unitTest.cpp; \<br>
&gt; then mv -f &quot;.deps/unitTest.Tpo&quot; &quot;.deps/unitTest.Po&quot;; else rm -f<br>
&gt; &quot;.deps/unitTest.Tpo&quot;; exit 1; fi<br>
&gt; /usr/include/c++/3.3.5/bits/stl_iterator_base_types.h: In instantiation<br>
&gt; of `std::iterator_traits&lt;int&gt;':<br>
&gt; /usr/include/c++/3.3.5/bits/basic_string.h:624: &nbsp; instantiated from<br>
&gt; `std::basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; std::basic_string&lt;_CharT,<br>
&gt; _Traits, _Alloc&gt;::replace(__gnu_cxx::__normal_iterator&lt;typename<br>
&gt; _Alloc::pointer, std::basic_string&lt;_CharT, _Traits, _Alloc&gt; &gt;,<br>
&gt; __gnu_cxx::__normal_iterator&lt;typename _Alloc::pointer,<br>
&gt; std::basic_string&lt;_CharT, _Traits, _Alloc&gt; &gt;, _InputIterator,<br>
&gt; _InputIterator) [with _InputIterator = int, _CharT = char, _Traits =<br>
&gt; std::char_traits&lt;char&gt;, _Alloc = std::allocator&lt;char&gt;]'<br>
&gt; /usr/include/c++/3.3.5/bits/basic_string.h:492: &nbsp; instantiated from<br>
&gt; `std::basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; std::basic_string&lt;_CharT,<br>
&gt; _Traits, _Alloc&gt;::append(_InputIterator, _InputIterator) [with<br>
&gt; _InputIterator = int, _CharT = char, _Traits = std::char_traits&lt;char&gt;,<br>
&gt; _Alloc = std::allocator&lt;char&gt;]'<br>
&gt; ../../../Clp/src/unitTest.cpp:1978: &nbsp; instantiated from here<br>
&gt; /usr/include/c++/3.3.5/bits/stl_iterator_base_types.h:126: error: `int'<br>
&gt; is not<br>
&gt; &nbsp; &nbsp;a class, struct, or union type<br>
&gt; /usr/include/c++/3.3.5/bits/stl_iterator_base_types.h:127: error: `int'<br>
&gt; is not<br>
&gt; ...etc.<br>
<br>
-- <br>
Michael &nbsp; hennebry@web.cs.ndsu.NoDak.edu<br>
&quot;Pessimist: The glass is half empty.<br>
Optimist: &nbsp; The glass is half full.<br>
Engineer: &nbsp; The glass is twice as big as it needs to be.&quot;<br>
<br>
_______________________________________________<br>
Clp mailing list<br>
Clp@list.coin-or.org<br>
</tt><tt><a href="http://list.coin-or.org/mailman/listinfo/clp">http://list.coin-or.org/mailman/listinfo/clp</a></tt><tt><br>
</tt><br>
<br>
</body></html>