<?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 Re: C++ program in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/c-program/m-p/3590494#M103835</link>
    <description>These are some system libraries.&lt;BR /&gt;&lt;BR /&gt;Check in your new system whether you have those files in /usr/lib.&lt;BR /&gt;&lt;BR /&gt;It also looks like library incompatibility problem.&lt;BR /&gt;You might be having a different version of libs in your new machine, something like&lt;BR /&gt;libc.1</description>
    <pubDate>Tue, 26 Jul 2005 23:45:15 GMT</pubDate>
    <dc:creator>Vibhor Kumar Agarwal</dc:creator>
    <dc:date>2005-07-26T23:45:15Z</dc:date>
    <item>
      <title>C++ program</title>
      <link>https://community.hpe.com/t5/operating-system-linux/c-program/m-p/3590493#M103834</link>
      <description>I used g++ (version 3.1) to compile a simple helloworld.cpp program. I used -static for the link flags.&lt;BR /&gt;&lt;BR /&gt;#include &lt;IOSTREAM&gt;&lt;BR /&gt;#include &lt;STRING&gt;&lt;BR /&gt;&lt;BR /&gt;int main(int argc, char *argv[])&lt;BR /&gt;{&lt;BR /&gt;   std::string str1 = "hello world";&lt;BR /&gt;   printf("Hello World \n");&lt;BR /&gt;   std::cout &amp;lt;&amp;lt; "Hello World" &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;   std::cout &amp;lt;&amp;lt; str1 &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;   return(0);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;The program works fine on the machine which have gcc installed, but when I copied the program to another HP-UX machine, which don't have g++ installed, it got a memory falut&lt;BR /&gt;&lt;BR /&gt;# ./he&lt;BR /&gt;Hello World&lt;BR /&gt;Memory fault(coredump)&lt;BR /&gt;&lt;BR /&gt;and ldd show not missing dynmaic lib.&lt;BR /&gt;# ldd he&lt;BR /&gt;   /usr/lib/libdld.2 =&amp;gt;    /usr/lib/libdld.2&lt;BR /&gt;   /usr/lib/libc.2 =&amp;gt;      /usr/lib/libc.2&lt;BR /&gt;   /usr/lib/libdld.2 =&amp;gt;    /usr/lib/libdld.2&lt;BR /&gt;&lt;BR /&gt;Does anybody know how to resolve this problem ?&lt;BR /&gt;&lt;BR /&gt;Thank you very much&lt;/STRING&gt;&lt;/IOSTREAM&gt;</description>
      <pubDate>Tue, 26 Jul 2005 19:38:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/c-program/m-p/3590493#M103834</guid>
      <dc:creator>Xiaowen Wu_1</dc:creator>
      <dc:date>2005-07-26T19:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: C++ program</title>
      <link>https://community.hpe.com/t5/operating-system-linux/c-program/m-p/3590494#M103835</link>
      <description>These are some system libraries.&lt;BR /&gt;&lt;BR /&gt;Check in your new system whether you have those files in /usr/lib.&lt;BR /&gt;&lt;BR /&gt;It also looks like library incompatibility problem.&lt;BR /&gt;You might be having a different version of libs in your new machine, something like&lt;BR /&gt;libc.1</description>
      <pubDate>Tue, 26 Jul 2005 23:45:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/c-program/m-p/3590494#M103835</guid>
      <dc:creator>Vibhor Kumar Agarwal</dc:creator>
      <dc:date>2005-07-26T23:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: C++ program</title>
      <link>https://community.hpe.com/t5/operating-system-linux/c-program/m-p/3590495#M103836</link>
      <description>Both machine have the same version of OS, and seems to both have libc.2 and libdld.2&lt;BR /&gt;&lt;BR /&gt;Which system library need to be verified ?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Jul 2005 11:28:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/c-program/m-p/3590495#M103836</guid>
      <dc:creator>Xiaowen Wu_1</dc:creator>
      <dc:date>2005-07-27T11:28:55Z</dc:date>
    </item>
  </channel>
</rss>

