<?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 STL in shared library problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/stl-in-shared-library-problem/m-p/2585092#M725533</link>
    <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I wrote a portion of code that looked like that:&lt;BR /&gt;-------------------------------&lt;BR /&gt;#include &lt;STRING&gt;&lt;BR /&gt;#include &lt;MAP&gt;&lt;BR /&gt;&lt;BR /&gt;int someproc()&lt;BR /&gt;{&lt;BR /&gt;  map&lt;STRING&gt; theMap;&lt;BR /&gt;  theMap.insert(map&lt;STRING&gt;::value_type("str1", "str2");&lt;BR /&gt;  // somecode&lt;BR /&gt;}&lt;BR /&gt;-------------------------------&lt;BR /&gt;&lt;BR /&gt;Of course, this is not an actual code. This test that has been written to verify the problem.&lt;BR /&gt;&lt;BR /&gt;The problem is that it works fine in an executable, but coredumps/overflows a stack/etc etc etc in a shared library.&lt;BR /&gt;The 'coredump statement' is the destructor of map object.&lt;BR /&gt;&lt;BR /&gt;I've created an executable with command:&lt;BR /&gt;  aCC +DAportable -o test test.C&lt;BR /&gt;and shared library with&lt;BR /&gt;  aCC +DAportable +z -b -lstd -lstream -o test.sl test_sh.C&lt;BR /&gt;&lt;BR /&gt;What was wrong? Please help.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;  Max V. Zinal&lt;BR /&gt;&lt;/STRING&gt;&lt;/STRING&gt;&lt;/MAP&gt;&lt;/STRING&gt;</description>
    <pubDate>Wed, 26 Sep 2001 06:16:33 GMT</pubDate>
    <dc:creator>Max V. Zinal</dc:creator>
    <dc:date>2001-09-26T06:16:33Z</dc:date>
    <item>
      <title>STL in shared library problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/stl-in-shared-library-problem/m-p/2585092#M725533</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I wrote a portion of code that looked like that:&lt;BR /&gt;-------------------------------&lt;BR /&gt;#include &lt;STRING&gt;&lt;BR /&gt;#include &lt;MAP&gt;&lt;BR /&gt;&lt;BR /&gt;int someproc()&lt;BR /&gt;{&lt;BR /&gt;  map&lt;STRING&gt; theMap;&lt;BR /&gt;  theMap.insert(map&lt;STRING&gt;::value_type("str1", "str2");&lt;BR /&gt;  // somecode&lt;BR /&gt;}&lt;BR /&gt;-------------------------------&lt;BR /&gt;&lt;BR /&gt;Of course, this is not an actual code. This test that has been written to verify the problem.&lt;BR /&gt;&lt;BR /&gt;The problem is that it works fine in an executable, but coredumps/overflows a stack/etc etc etc in a shared library.&lt;BR /&gt;The 'coredump statement' is the destructor of map object.&lt;BR /&gt;&lt;BR /&gt;I've created an executable with command:&lt;BR /&gt;  aCC +DAportable -o test test.C&lt;BR /&gt;and shared library with&lt;BR /&gt;  aCC +DAportable +z -b -lstd -lstream -o test.sl test_sh.C&lt;BR /&gt;&lt;BR /&gt;What was wrong? Please help.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;  Max V. Zinal&lt;BR /&gt;&lt;/STRING&gt;&lt;/STRING&gt;&lt;/MAP&gt;&lt;/STRING&gt;</description>
      <pubDate>Wed, 26 Sep 2001 06:16:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/stl-in-shared-library-problem/m-p/2585092#M725533</guid>
      <dc:creator>Max V. Zinal</dc:creator>
      <dc:date>2001-09-26T06:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: STL in shared library problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/stl-in-shared-library-problem/m-p/2585093#M725534</link>
      <description>try with static library version.&lt;BR /&gt;&lt;BR /&gt;while linking use following option&lt;BR /&gt;-Wl,-a,archive&lt;BR /&gt;&lt;BR /&gt;shared library having some side effectes.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Sep 2001 17:15:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/stl-in-shared-library-problem/m-p/2585093#M725534</guid>
      <dc:creator>satyach</dc:creator>
      <dc:date>2001-09-26T17:15:40Z</dc:date>
    </item>
  </channel>
</rss>

