<?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: How compile a shared library ???  Help !!!! in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345968#M667604</link>
    <description>Let me add more detial.&lt;BR /&gt;I hava a HP-UX itanium 12.23 and the datbase is oracle 10g&lt;BR /&gt;&lt;BR /&gt;When I compile the C programm I can create the .so (shared library) and .o files. But when I tried to call it from the procedure in oracle I receive an error. I think maybe i'm not compiling in the correct way.&lt;BR /&gt;I receive the next errors&lt;BR /&gt;&lt;BR /&gt;ora-06520: PL/SQL: Error loading external library&lt;BR /&gt;ora-06522 '/oracle/SA_scripts/scripts/shell.so' is not a valid load module. Bad magic &lt;BR /&gt;number&lt;BR /&gt;</description>
    <pubDate>Wed, 28 Jan 2009 23:48:23 GMT</pubDate>
    <dc:creator>Lorein</dc:creator>
    <dc:date>2009-01-28T23:48:23Z</dc:date>
    <item>
      <title>How compile a shared library ???  Help !!!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345965#M667601</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I have a progrma in C and I want to compile as a shared library.&lt;BR /&gt;&lt;BR /&gt;My program name is shell.c and this is the code&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;STDLIB.H&gt;&lt;BR /&gt;#include &lt;STRING.H&gt;&lt;BR /&gt;&lt;BR /&gt;void sh(char *);&lt;BR /&gt;&lt;BR /&gt;void sh( char  *cmd )&lt;BR /&gt;{&lt;BR /&gt;        int num;&lt;BR /&gt;&lt;BR /&gt;                num = system(cmd);&lt;BR /&gt;                }&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This is the correct way to compile a shell library ?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ cc -b -c shell.c &lt;BR /&gt;$ ld -r -o shell.so shell.o&lt;BR /&gt;&lt;BR /&gt;I'll call this library from an Oracle 10g procedure&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STRING.H&gt;&lt;/STDLIB.H&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Tue, 27 Jan 2009 23:13:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345965#M667601</guid>
      <dc:creator>Lorein</dc:creator>
      <dc:date>2009-01-27T23:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: How compile a shared library ???  Help !!!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345966#M667602</link>
      <description>Is this for PA or IPF?&lt;BR /&gt;$ cc -b +z shell.c</description>
      <pubDate>Wed, 28 Jan 2009 02:18:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345966#M667602</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-01-28T02:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: How compile a shared library ???  Help !!!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345967#M667603</link>
      <description>Is Itanium.&lt;BR /&gt;</description>
      <pubDate>Wed, 28 Jan 2009 19:48:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345967#M667603</guid>
      <dc:creator>Lorein</dc:creator>
      <dc:date>2009-01-28T19:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: How compile a shared library ???  Help !!!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345968#M667604</link>
      <description>Let me add more detial.&lt;BR /&gt;I hava a HP-UX itanium 12.23 and the datbase is oracle 10g&lt;BR /&gt;&lt;BR /&gt;When I compile the C programm I can create the .so (shared library) and .o files. But when I tried to call it from the procedure in oracle I receive an error. I think maybe i'm not compiling in the correct way.&lt;BR /&gt;I receive the next errors&lt;BR /&gt;&lt;BR /&gt;ora-06520: PL/SQL: Error loading external library&lt;BR /&gt;ora-06522 '/oracle/SA_scripts/scripts/shell.so' is not a valid load module. Bad magic &lt;BR /&gt;number&lt;BR /&gt;</description>
      <pubDate>Wed, 28 Jan 2009 23:48:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345968#M667604</guid>
      <dc:creator>Lorein</dc:creator>
      <dc:date>2009-01-28T23:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: How compile a shared library ???  Help !!!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345969#M667605</link>
      <description>&amp;gt;But when I tried to call it from the procedure in oracle I receive an error. I think maybe i'm not compiling in the correct way.&lt;BR /&gt;&lt;BR /&gt;Oracle is 64 bit so your shlib must be compiled the same way.&lt;BR /&gt;$ cc -b +DD64 +z shell.c -o shell.so&lt;BR /&gt;&lt;BR /&gt;&amp;gt;is not a valid load module. Bad magic number&lt;BR /&gt;&lt;BR /&gt;Right I get the same thing:&lt;BR /&gt;dlopen error: './libdebug.so' is not a valid load module: Bad magic number&lt;BR /&gt;$ file a.out libdebug.so&lt;BR /&gt;a.out:          ELF-32 executable object file - IA64&lt;BR /&gt;libdebug.so:    ELF-64 shared object file - IA64&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Jan 2009 00:31:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345969#M667605</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-01-29T00:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: How compile a shared library ???  Help !!!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345970#M667606</link>
      <description>&lt;BR /&gt;Do you know what else I need to do?&lt;BR /&gt;&lt;BR /&gt;What is the correct way to compile a shared library?&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Thu, 12 Feb 2009 00:01:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345970#M667606</guid>
      <dc:creator>Lorein</dc:creator>
      <dc:date>2009-02-12T00:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: How compile a shared library ???  Help !!!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345971#M667607</link>
      <description>&amp;gt;Do you know what else I need to do?&lt;BR /&gt;&amp;gt;What is the correct way to compile a shared library?&lt;BR /&gt;&lt;BR /&gt;Unless you have a new error message or a different question, my answers are the same.&lt;BR /&gt;&lt;BR /&gt;What does "file /oracle/SA_scripts/scripts/shell.so" show?</description>
      <pubDate>Thu, 12 Feb 2009 00:39:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345971#M667607</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-02-12T00:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: How compile a shared library ???  Help !!!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345972#M667608</link>
      <description>&lt;BR /&gt;Now I fixed the error of magic number , and I compile the library like you did: &lt;BR /&gt;$  cc -b +DD64 +z shell.c -o shell.so&lt;BR /&gt;&lt;BR /&gt;My question now is how can I link this file? in order to create a shell.o&lt;BR /&gt;&lt;BR /&gt;thanks!</description>
      <pubDate>Thu, 12 Feb 2009 15:45:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345972#M667608</guid>
      <dc:creator>Lorein</dc:creator>
      <dc:date>2009-02-12T15:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: How compile a shared library ???  Help !!!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345973#M667609</link>
      <description>&amp;gt;My question now is how can I link this file? in order to create a shell.o&lt;BR /&gt;&lt;BR /&gt;This compiles and links and creates shell.so in one step.&lt;BR /&gt;If you need multiple steps:&lt;BR /&gt;cc -c +z sources ...&lt;BR /&gt;cc -b -o shell.so objects</description>
      <pubDate>Fri, 13 Feb 2009 03:32:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345973#M667609</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-02-13T03:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: How compile a shared library ???  Help !!!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345974#M667610</link>
      <description>It might be helpful to look at the documentation:&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/14487/libs.htm" target="_blank"&gt;http://docs.hp.com/en/14487/libs.htm&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/14640/OnlineHelp/linkhelp.html" target="_blank"&gt;http://docs.hp.com/en/14640/OnlineHelp/linkhelp.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;You can also use:&lt;BR /&gt;cc +help&lt;BR /&gt;ld +help</description>
      <pubDate>Fri, 13 Feb 2009 03:39:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345974#M667610</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-02-13T03:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: How compile a shared library ???  Help !!!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345975#M667611</link>
      <description>Thanks let me try...</description>
      <pubDate>Fri, 13 Feb 2009 15:38:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345975#M667611</guid>
      <dc:creator>Lorein</dc:creator>
      <dc:date>2009-02-13T15:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: How compile a shared library ???  Help !!!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345976#M667612</link>
      <description>If you are happy with the answers you got, please read the following about assigning points:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/helptips.do?#33" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/helptips.do?#33&lt;/A&gt;</description>
      <pubDate>Fri, 13 Feb 2009 22:54:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-compile-a-shared-library-help/m-p/4345976#M667612</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-02-13T22:54:33Z</dc:date>
    </item>
  </channel>
</rss>

