<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic gcc: cout problem! in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/gcc-cout-problem/m-p/2797205#M720615</link>
    <description>After having my gcc3.2 installed , I did these:&lt;BR /&gt;#cd /tmp&lt;BR /&gt;#vi hello.C&lt;BR /&gt;=====This is source file=====&lt;BR /&gt;#include &lt;IOSTREAM&gt;&lt;BR /&gt;using namespace std;&lt;BR /&gt;main()&lt;BR /&gt;{&lt;BR /&gt; cout &amp;gt;&amp;gt; "This is a test.";&lt;BR /&gt;}&lt;BR /&gt;=====end=====================&lt;BR /&gt;#/usr/local/bin/gcc ./hello.C&lt;BR /&gt;&lt;BR /&gt;Now I get an error message:&lt;BR /&gt;hello.C: In function `int main()`:&lt;BR /&gt;hello.C: 7: no match for `std::ostream&amp;amp; &amp;gt;&amp;gt; std::string&amp;amp;` operator&lt;BR /&gt;&lt;BR /&gt;Would anyone tell me why and how to correct them?&lt;BR /&gt;Thank in advance!&lt;/IOSTREAM&gt;</description>
    <pubDate>Fri, 30 Aug 2002 02:10:40 GMT</pubDate>
    <dc:creator>Fragon</dc:creator>
    <dc:date>2002-08-30T02:10:40Z</dc:date>
    <item>
      <title>gcc: cout problem!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/gcc-cout-problem/m-p/2797205#M720615</link>
      <description>After having my gcc3.2 installed , I did these:&lt;BR /&gt;#cd /tmp&lt;BR /&gt;#vi hello.C&lt;BR /&gt;=====This is source file=====&lt;BR /&gt;#include &lt;IOSTREAM&gt;&lt;BR /&gt;using namespace std;&lt;BR /&gt;main()&lt;BR /&gt;{&lt;BR /&gt; cout &amp;gt;&amp;gt; "This is a test.";&lt;BR /&gt;}&lt;BR /&gt;=====end=====================&lt;BR /&gt;#/usr/local/bin/gcc ./hello.C&lt;BR /&gt;&lt;BR /&gt;Now I get an error message:&lt;BR /&gt;hello.C: In function `int main()`:&lt;BR /&gt;hello.C: 7: no match for `std::ostream&amp;amp; &amp;gt;&amp;gt; std::string&amp;amp;` operator&lt;BR /&gt;&lt;BR /&gt;Would anyone tell me why and how to correct them?&lt;BR /&gt;Thank in advance!&lt;/IOSTREAM&gt;</description>
      <pubDate>Fri, 30 Aug 2002 02:10:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/gcc-cout-problem/m-p/2797205#M720615</guid>
      <dc:creator>Fragon</dc:creator>
      <dc:date>2002-08-30T02:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: gcc: cout problem!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/gcc-cout-problem/m-p/2797206#M720616</link>
      <description>Can you try this&lt;BR /&gt;"cout &amp;lt;&amp;lt;" and not "cout &amp;gt;&amp;gt;"</description>
      <pubDate>Fri, 30 Aug 2002 02:32:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/gcc-cout-problem/m-p/2797206#M720616</guid>
      <dc:creator>T G Manikandan</dc:creator>
      <dc:date>2002-08-30T02:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: gcc: cout problem!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/gcc-cout-problem/m-p/2797207#M720617</link>
      <description>Shouldn't you also be using c++ or g++ instead?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;l1:/tmp 107 &amp;gt; cat xx.C&lt;BR /&gt;#include &lt;IOSTREAM&gt;&lt;BR /&gt;using namespace std;&lt;BR /&gt;main ()&lt;BR /&gt;{&lt;BR /&gt;    cout &amp;gt;&amp;gt; "This is a test.";&lt;BR /&gt;    }&lt;BR /&gt;l1:/tmp 108 &amp;gt; gcc -o xx xx.C&lt;BR /&gt;xx.C: In function `int main()':&lt;BR /&gt;xx.C:5: no match for `std::ostream&amp;amp; &amp;gt;&amp;gt; const char[16]' operator&lt;BR /&gt;Exit 1&lt;BR /&gt;l1:/tmp 109 &amp;gt; g++ -o xx xx.C&lt;BR /&gt;xx.C: In function `int main()':&lt;BR /&gt;xx.C:5: no match for `std::ostream&amp;amp; &amp;gt;&amp;gt; const char[16]' operator&lt;BR /&gt;Exit 1&lt;BR /&gt;l1:/tmp 110 &amp;gt; perl -pi -e's/&amp;gt;&amp;gt;/&amp;lt;l1:/tmp 111 &amp;gt; gcc -o xx xx.C&lt;BR /&gt;/usr/ccs/bin/ld: Unsatisfied symbols:&lt;BR /&gt;   std::ios_base::Init::~Init [in-charge]()(first referenced in /tmp/ccQ5mf0t.o) (code)&lt;BR /&gt;   std::ios_base::Init::Init[in-charge]()(first referenced in /tmp/ccQ5mf0t.o) (code)&lt;BR /&gt;   std::basic_ostream&lt;CHAR&gt; &amp;gt;&amp;amp; std::operator&amp;lt;&amp;lt; &amp;lt;:char_traits&amp;gt; &amp;gt;(std::basic_ostream&lt;CHAR&gt; &amp;gt;&amp;amp;, char const*)(first referenced in /tmp/ccQ5mf0t.o) (code)&lt;BR /&gt;   std::cout (first referenced in /tmp/ccQ5mf0t.o) (data)&lt;BR /&gt;collect2: ld returned 1 exit status&lt;BR /&gt;Exit 1&lt;BR /&gt;l1:/tmp 112 &amp;gt; g++ -o xx xx.C&lt;BR /&gt;l1:/tmp 113 &amp;gt;&lt;BR /&gt;&lt;/CHAR&gt;&lt;/CHAR&gt;&lt;/IOSTREAM&gt;</description>
      <pubDate>Fri, 30 Aug 2002 06:40:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/gcc-cout-problem/m-p/2797207#M720617</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2002-08-30T06:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: gcc: cout problem!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/gcc-cout-problem/m-p/2797208#M720618</link>
      <description>Thank procura!&lt;BR /&gt;#/usr/local/bin/g++ -o hello hello.C&lt;BR /&gt;OK!&lt;BR /&gt;But when I type:&lt;BR /&gt;#./hello&lt;BR /&gt;I get some errors just like this:&lt;BR /&gt;================&lt;BR /&gt;/usr/lib/dld.sl: Unresolved symbol: pthread_once (code)  from /usr/local/lib/gcc&lt;BR /&gt;-lib/hppa2.0n-hp-hpux11.00/3.2/../../../libgcc_s.sl&lt;BR /&gt;Abort(coredump)&lt;BR /&gt;================&lt;BR /&gt;Why?&lt;BR /&gt;</description>
      <pubDate>Fri, 30 Aug 2002 06:55:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/gcc-cout-problem/m-p/2797208#M720618</guid>
      <dc:creator>Fragon</dc:creator>
      <dc:date>2002-08-30T06:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: gcc: cout problem!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/gcc-cout-problem/m-p/2797209#M720619</link>
      <description>l1:/tmp 126 &amp;gt; ./xx&lt;BR /&gt;This is a test.l1:/tmp 127 &amp;gt;&lt;BR /&gt;&lt;BR /&gt;Hmmm, beats me.&lt;BR /&gt;FWIW, I never use g++&lt;BR /&gt;&lt;BR /&gt;Where did you get it from?&lt;BR /&gt;My port is available on &lt;A href="https://www.beepz.com/personal/merijn" target="_blank"&gt;https://www.beepz.com/personal/merijn&lt;/A&gt;&lt;BR /&gt;If you go for that one (including binutils-2.13 and gdb-5.2.1) please *do* read the instructions</description>
      <pubDate>Fri, 30 Aug 2002 07:02:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/gcc-cout-problem/m-p/2797209#M720619</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2002-08-30T07:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: gcc: cout problem!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/gcc-cout-problem/m-p/2797210#M720620</link>
      <description>Try linking against the pthread library explicitly (should be -lpthread for the link step). &lt;BR /&gt;&lt;BR /&gt;Regards, M. &lt;BR /&gt;</description>
      <pubDate>Mon, 02 Sep 2002 04:05:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/gcc-cout-problem/m-p/2797210#M720620</guid>
      <dc:creator>Martin Schneider_2</dc:creator>
      <dc:date>2002-09-02T04:05:24Z</dc:date>
    </item>
  </channel>
</rss>

