<?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 Create shared library in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/create-shared-library/m-p/2579346#M924293</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;How can I implement a C program to a shared library so that any other C program can call the function in the shared library ?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Patrick</description>
    <pubDate>Fri, 14 Sep 2001 02:35:46 GMT</pubDate>
    <dc:creator>Patrick Chim</dc:creator>
    <dc:date>2001-09-14T02:35:46Z</dc:date>
    <item>
      <title>Create shared library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-shared-library/m-p/2579346#M924293</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;How can I implement a C program to a shared library so that any other C program can call the function in the shared library ?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Patrick</description>
      <pubDate>Fri, 14 Sep 2001 02:35:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-shared-library/m-p/2579346#M924293</guid>
      <dc:creator>Patrick Chim</dc:creator>
      <dc:date>2001-09-14T02:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Create shared library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-shared-library/m-p/2579347#M924294</link>
      <description>If I understand your question correctly&lt;BR /&gt;a compiler line something like :-&lt;BR /&gt;&lt;BR /&gt;aCC -b +z -o main.sl main.cpp&lt;BR /&gt;&lt;BR /&gt;should suffice</description>
      <pubDate>Fri, 14 Sep 2001 13:03:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-shared-library/m-p/2579347#M924294</guid>
      <dc:creator>glenn henley</dc:creator>
      <dc:date>2001-09-14T13:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Create shared library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-shared-library/m-p/2579348#M924295</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;How can I compile another program with this shared library ? Can you show the command line for me ?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Patrick</description>
      <pubDate>Sat, 15 Sep 2001 00:08:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-shared-library/m-p/2579348#M924295</guid>
      <dc:creator>Patrick Chim</dc:creator>
      <dc:date>2001-09-15T00:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: Create shared library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-shared-library/m-p/2579349#M924296</link>
      <description>Here's about the most simplistic example&lt;BR /&gt;I can come up with.... normally I'd have&lt;BR /&gt;stuff like this in a makefile.&lt;BR /&gt;&lt;BR /&gt;stuff.h&lt;BR /&gt;-------&lt;BR /&gt; #include&lt;STDIO.H&gt;&lt;BR /&gt; void out();&lt;BR /&gt;&lt;BR /&gt;stuff.cpp&lt;BR /&gt;---------&lt;BR /&gt; #include "stuff.h"&lt;BR /&gt; void out()&lt;BR /&gt; {&lt;BR /&gt;    printf("Hello world\n");&lt;BR /&gt; };&lt;BR /&gt;&lt;BR /&gt;main.cpp&lt;BR /&gt;--------&lt;BR /&gt; #include "stuff.h"&lt;BR /&gt; int main()&lt;BR /&gt; {&lt;BR /&gt;    out();&lt;BR /&gt;    return 1;&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt;..and then to actually build the things&lt;BR /&gt;---------------------------------------&lt;BR /&gt;&lt;BR /&gt;1)   aCC -b +z -o libStuff.sl stuff.cpp&lt;BR /&gt;2)   aCC -L./ -lStuff -o main main.cpp&lt;BR /&gt;&lt;BR /&gt;-L indicates where 'Stuff' lives&lt;BR /&gt;-l is the library name, the lib &amp;amp; .sl&lt;BR /&gt;   gets wrapped around it.&lt;BR /&gt;&lt;BR /&gt;I think that's it.... just make sure if you&lt;BR /&gt;try this example everything lives in the&lt;BR /&gt;same directory. &lt;BR /&gt;&lt;BR /&gt;Best 'o Luck&lt;BR /&gt;&lt;BR /&gt;Glenn&lt;/STDIO.H&gt;</description>
      <pubDate>Tue, 18 Sep 2001 12:27:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-shared-library/m-p/2579349#M924296</guid>
      <dc:creator>glenn henley</dc:creator>
      <dc:date>2001-09-18T12:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: Create shared library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-shared-library/m-p/2579350#M924297</link>
      <description>Hi glenn,&lt;BR /&gt;&lt;BR /&gt;My system running HP-UX 11.0 and use the cc compiler come from HP. I replace the aCC with cc but it say it does not have the -b option. Do you know how to compile in my environment ?&lt;BR /&gt;&lt;BR /&gt;And, can I add the shared library in a search path ? If so, what environment variable can I set ?&lt;BR /&gt;&lt;BR /&gt;Many thanks,&lt;BR /&gt;Patrick</description>
      <pubDate>Wed, 19 Sep 2001 00:53:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-shared-library/m-p/2579350#M924297</guid>
      <dc:creator>Patrick Chim</dc:creator>
      <dc:date>2001-09-19T00:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Create shared library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-shared-library/m-p/2579351#M924298</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;with the ANSI-C compiler (the bundled cc compiler which comes with HPUX does not support Positin Independant Code), the procedure would be :&lt;BR /&gt;&lt;BR /&gt;cc +z -c -o sub.o sub.c&lt;BR /&gt;ld -b sub.o libxxx.sl&lt;BR /&gt;mv libxxx.sl $instdir&lt;BR /&gt;&lt;BR /&gt;cc -L $instdir main.c -o main&lt;BR /&gt;&lt;BR /&gt;Regards, Klaus</description>
      <pubDate>Wed, 19 Sep 2001 14:44:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-shared-library/m-p/2579351#M924298</guid>
      <dc:creator>Klaus Crusius</dc:creator>
      <dc:date>2001-09-19T14:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: Create shared library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-shared-library/m-p/2579352#M924299</link>
      <description>to create your library&lt;BR /&gt;&lt;BR /&gt;for each source file :&lt;BR /&gt;cc +z -c  file.c&lt;BR /&gt;&lt;BR /&gt;and then&lt;BR /&gt;ld -b -o libmylib.sl  file1.o file2.o ....&lt;BR /&gt;&lt;BR /&gt;to use it in building an executable :&lt;BR /&gt;cc  -L. -lmylib -o myexec myexec.c&lt;BR /&gt;&lt;BR /&gt;you should set the SHLIB_PATH environment variable &lt;BR /&gt;when you launch the program.&lt;BR /&gt;&lt;BR /&gt;Blanche</description>
      <pubDate>Wed, 19 Sep 2001 14:45:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-shared-library/m-p/2579352#M924299</guid>
      <dc:creator>Blanche</dc:creator>
      <dc:date>2001-09-19T14:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: Create shared library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-shared-library/m-p/2579353#M924300</link>
      <description>Sorry I fogot an option to use the SHLIB_PATH variable at run-time&lt;BR /&gt;&lt;BR /&gt;the right compilation line is :&lt;BR /&gt;cc -Wl,+s -L. -lmylib -o myexec myexec.c &lt;BR /&gt;&lt;BR /&gt;Blanche</description>
      <pubDate>Wed, 19 Sep 2001 15:04:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-shared-library/m-p/2579353#M924300</guid>
      <dc:creator>Blanche</dc:creator>
      <dc:date>2001-09-19T15:04:22Z</dc:date>
    </item>
  </channel>
</rss>

