<?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: Linking program with libraries in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/linking-program-with-libraries/m-p/2843834#M721310</link>
    <description>Hi!&lt;BR /&gt;Thank you procura for the answer!&lt;BR /&gt;There still is something wrong, however...&lt;BR /&gt;I have recompiled all routines in both libraries with the +Z option both for f90 and cc compilers and I have changed the extension for the libraries to .sl (instead of .a) and I use "ld -b -o" (instead of "ar rv") to enter the subroutines into the libraries, but now no library subroutine at all is loaded in the program, at least there is a very long list of unsatisfied externals.&lt;BR /&gt;I have tried to load the program with f90 or aCC (even if there are no C++ routines in this program) with the same result.</description>
    <pubDate>Thu, 14 Nov 2002 10:12:16 GMT</pubDate>
    <dc:creator>Leif Halvarsson_2</dc:creator>
    <dc:date>2002-11-14T10:12:16Z</dc:date>
    <item>
      <title>Linking program with libraries</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/linking-program-with-libraries/m-p/2843831#M721307</link>
      <description>I get a list of 14 unsatisfied externals when I try to link a program with two subroutine-libraries. If I, as a test, omit the libraries the list will be about 75 unsatisfied externals.&lt;BR /&gt;It seems (to me) that the linker manages to find some subroutines but not all. The missing subroutines are referenced from either the main program or one of the libraries.&lt;BR /&gt;The program and the library subroutines are written in Fortran77 or C.&lt;BR /&gt;&lt;BR /&gt;Compiling of library subroutine:&lt;BR /&gt;f90 -c -O -K -DAportable +U77 +ppu -o abbcor.o abbcor.F&lt;BR /&gt;cc -c -O -DAportable -Aa -D_HPUX_SOURCE -D_NO_PROTO -DSYSV -I/usr/include/X11R5 -o tsdrve.o tsdrve.c&lt;BR /&gt;&lt;BR /&gt;Making the libraries:&lt;BR /&gt;ar rv libjack.a abbcor.o&lt;BR /&gt;ar rv c08.a tsdrve.o&lt;BR /&gt;ranlib libjack.a&lt;BR /&gt;&lt;BR /&gt;Linking program:&lt;BR /&gt;f90 -Wl,-aarchive_shared -L/usr/lib/X11R5 -lm -O -o jackal jackal.o libjack.a c08.a&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Nov 2002 11:58:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/linking-program-with-libraries/m-p/2843831#M721307</guid>
      <dc:creator>Leif Halvarsson_2</dc:creator>
      <dc:date>2002-11-13T11:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: Linking program with libraries</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/linking-program-with-libraries/m-p/2843832#M721308</link>
      <description>why not 'ranlib c08.a' ?&lt;BR /&gt;&lt;BR /&gt;Hmm, shared archives requested, static archives made ...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;f90 -c -O .... +Z blah.F&lt;BR /&gt;cc -c -O .... +Z -o foo.c&lt;BR /&gt;ld -b -o blah.sl blah.o&lt;BR /&gt;ld -b -o foo.sl foo.o&lt;BR /&gt;&lt;BR /&gt;f90 -L. -L/usr/... -o jackal jackal.o -lblah -lfoo</description>
      <pubDate>Wed, 13 Nov 2002 12:51:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/linking-program-with-libraries/m-p/2843832#M721308</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2002-11-13T12:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: Linking program with libraries</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/linking-program-with-libraries/m-p/2843833#M721309</link>
      <description>Last had -o too many, soory ...&lt;BR /&gt;&lt;BR /&gt;f90 -c -O .... +Z blah.F&lt;BR /&gt;cc -c -O .... +Z foo.c&lt;BR /&gt;ld -b -o blah.sl blah.o&lt;BR /&gt;ld -b -o foo.sl foo.o&lt;BR /&gt;&lt;BR /&gt;f90 -L. -L/usr/... -o jackal jackal.o -lblah -lfoo</description>
      <pubDate>Wed, 13 Nov 2002 12:52:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/linking-program-with-libraries/m-p/2843833#M721309</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2002-11-13T12:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: Linking program with libraries</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/linking-program-with-libraries/m-p/2843834#M721310</link>
      <description>Hi!&lt;BR /&gt;Thank you procura for the answer!&lt;BR /&gt;There still is something wrong, however...&lt;BR /&gt;I have recompiled all routines in both libraries with the +Z option both for f90 and cc compilers and I have changed the extension for the libraries to .sl (instead of .a) and I use "ld -b -o" (instead of "ar rv") to enter the subroutines into the libraries, but now no library subroutine at all is loaded in the program, at least there is a very long list of unsatisfied externals.&lt;BR /&gt;I have tried to load the program with f90 or aCC (even if there are no C++ routines in this program) with the same result.</description>
      <pubDate>Thu, 14 Nov 2002 10:12:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/linking-program-with-libraries/m-p/2843834#M721310</guid>
      <dc:creator>Leif Halvarsson_2</dc:creator>
      <dc:date>2002-11-14T10:12:16Z</dc:date>
    </item>
  </channel>
</rss>

