<?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: link problem in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/link-problem/m-p/3939775#M11482</link>
    <description>&amp;gt; Steven's suggestion will probably work for&lt;BR /&gt;&amp;gt; qsort, but [...]&lt;BR /&gt;&lt;BR /&gt;For the record, my only claim is that I&lt;BR /&gt;solved LINK problem.  I did not look at the&lt;BR /&gt;attachment, and I have no idea if the qsort()&lt;BR /&gt;arguments are being passed correctly from the&lt;BR /&gt;Fortran (or, as I like to remember it,&lt;BR /&gt;FORTRAN) code.  (My examples didn't pass any&lt;BR /&gt;arguments, as you may have noticed.)&lt;BR /&gt;&lt;BR /&gt;And "into the future", I would not expect any&lt;BR /&gt;major changes to this part of&lt;BR /&gt;DEC/Compaq/HP/(whatever) C (other than its&lt;BR /&gt;name), but it may be that after 14 years with&lt;BR /&gt;no such changes, the time has come (or will&lt;BR /&gt;come before we're all dead).  I won't hold my&lt;BR /&gt;breath.</description>
    <pubDate>Wed, 07 Feb 2007 22:46:30 GMT</pubDate>
    <dc:creator>Steven Schweda</dc:creator>
    <dc:date>2007-02-07T22:46:30Z</dc:date>
    <item>
      <title>link problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/link-problem/m-p/3939771#M11478</link>
      <description>My sample Fortran application call C Run Time Library Qsort function.&lt;BR /&gt; linked in alpha openVMS 7.3-2 is ok.&lt;BR /&gt;=====================================================&lt;BR /&gt;$fort qsort_sample.for&lt;BR /&gt;$link qsort_sample,sys$library:vaxcrtl.olb/lib&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;but since I64 does not have VAXCRTL.OLB  , I use imagelib.olb instead&lt;BR /&gt;to link in OpenVMS Integrity Servers (I64) 8.2&lt;BR /&gt;but I got undefined symbol error:&lt;BR /&gt;=====================================================&lt;BR /&gt;$ fort qsort_sample.for&lt;BR /&gt;$ link qsort_example ,sys$library:imagelib.olb/lib&lt;BR /&gt;%ILINK-W-NUDFSYMS, 1 undefined symbol:&lt;BR /&gt;%ILINK-I-UDFSYM,        QSORT&lt;BR /&gt;%ILINK-W-USEUNDEF, undefined symbol QSORT referenced&lt;BR /&gt;  section: $CODE$&lt;BR /&gt;  offset: %X0000000000000080  slot: 2&lt;BR /&gt;  module: QSORT_EXAMPLE&lt;BR /&gt;  file: USER2:[ZFAN]QSORT_EXAMPLE.OBJ&lt;BR /&gt;&lt;BR /&gt;Anyone have a idea ?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Zhilin Fan&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Feb 2007 20:15:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/link-problem/m-p/3939771#M11478</guid>
      <dc:creator>zhilin fan</dc:creator>
      <dc:date>2007-02-06T20:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: link problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/link-problem/m-p/3939772#M11479</link>
      <description>&lt;!--!*#--&gt;alp $ type qs0.for&lt;BR /&gt;      program qs&lt;BR /&gt;      call qsort()&lt;BR /&gt;      end&lt;BR /&gt;alp $ for qs0&lt;BR /&gt;alp $ link qs0&lt;BR /&gt;%LINK-W-NUDFSYMS, 1 undefined symbol:&lt;BR /&gt;%LINK-I-UDFSYM,         QSORT &lt;BR /&gt;%LINK-W-USEUNDEF, undefined symbol QSORT referenced&lt;BR /&gt;        in psect $LINK$ offset %X00000040&lt;BR /&gt;        in module QS file ALP$DKA0:[SMS]QS0.OBJ;1&lt;BR /&gt;&lt;BR /&gt;alp $ type qs1.for&lt;BR /&gt;      program qs&lt;BR /&gt;      call decc$qsort()&lt;BR /&gt;      end&lt;BR /&gt;alp $ for qs1&lt;BR /&gt;alp $ link qs1   !!! No special stuff needed.&lt;BR /&gt;alp $ &lt;BR /&gt;&lt;BR /&gt;Functions in the DEC C libraries have a&lt;BR /&gt;"DECC$" prefix (or worse).&lt;BR /&gt;&lt;BR /&gt;alp $ for /vers&lt;BR /&gt;HP Fortran V7.6-3276-48D52&lt;BR /&gt;&lt;BR /&gt;alp $ tcpip show vers  !!! Easy path to details.&lt;BR /&gt;&lt;BR /&gt;  HP TCP/IP Services for OpenVMS Alpha Version V5.4 - ECO 6&lt;BR /&gt;  on a COMPAQ Professional Workstation XP1000 running OpenVMS V7.3-2  &lt;BR /&gt;</description>
      <pubDate>Tue, 06 Feb 2007 20:47:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/link-problem/m-p/3939772#M11479</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2007-02-06T20:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: link problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/link-problem/m-p/3939773#M11480</link>
      <description>Some background on C on OpenVMS...&lt;BR /&gt;&lt;BR /&gt;VAXCRTL.OLB is an ancient and (mostly) long-forgotten technique for including object code modules for VAX C code.  The replacement for VAX C is VAXCRTL.EXE, a shareable image.  This too has been replaced back in 1993; the VAX C V3.2 compiler was superceded by the ANSI C DEC C V4.0 compiler in 1993.&lt;BR /&gt;&lt;BR /&gt;DEC C for OpenVMS VAX does not use and does not need the VAXCRTL modules, object library or shareable image.&lt;BR /&gt;&lt;BR /&gt;DEC C is massively better at finding latent bugs in C code, and more recent compilers are  best at this.  VAX C is about the definition of laissez faire compilation.   DEC C finds and reports all manner of latent coding bugs.&lt;BR /&gt;&lt;BR /&gt;The default link path includes IMAGELIB.OLB, a shareable image library, and this is automatically including in the path of the linker.  Unless you have told the linker to exclude it, it's always present.&lt;BR /&gt;&lt;BR /&gt;Directly accessing routines in the C library from languages other than C has been a bit iffy.  HP likely wants you to use a C wrapper around the function, and that would pick up the prefix automatically.  (The addition of the decc$ prefix is why the the DEC C shareable can be in IMAGELIB, and IMAGELIB is in the default path.  VAX C didn't prefix routines, and that meant that C functions could be included erroneously should VAXCRTL.EXE have been included in the default path; inserted into IMAGELIB.  Because of this, VAXCRTL could not be in IMAGELIB.OLB.)&lt;BR /&gt;&lt;BR /&gt;With some C functions, there is also a sensitivity around the initialization of the RTL.  There's a routine in the C library that can get called to resolve this.  C main functions get this for free, as part of what the C compiler inserts for the main() function.&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Feb 2007 21:16:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/link-problem/m-p/3939773#M11480</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2007-02-06T21:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: link problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/link-problem/m-p/3939774#M11481</link>
      <description>The "right" way to do this would be to write a C routine which calls qsort, that you can call from your Fortran program. That way you have control over parameter passing between Fortran and C, and the RTL issues mentioned by Hoff are dealt with by the compilers.&lt;BR /&gt;&lt;BR /&gt; Steven's suggestion will probably work for qsort, but might not for other RTL routines, or into the future.</description>
      <pubDate>Wed, 07 Feb 2007 20:27:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/link-problem/m-p/3939774#M11481</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2007-02-07T20:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: link problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/link-problem/m-p/3939775#M11482</link>
      <description>&amp;gt; Steven's suggestion will probably work for&lt;BR /&gt;&amp;gt; qsort, but [...]&lt;BR /&gt;&lt;BR /&gt;For the record, my only claim is that I&lt;BR /&gt;solved LINK problem.  I did not look at the&lt;BR /&gt;attachment, and I have no idea if the qsort()&lt;BR /&gt;arguments are being passed correctly from the&lt;BR /&gt;Fortran (or, as I like to remember it,&lt;BR /&gt;FORTRAN) code.  (My examples didn't pass any&lt;BR /&gt;arguments, as you may have noticed.)&lt;BR /&gt;&lt;BR /&gt;And "into the future", I would not expect any&lt;BR /&gt;major changes to this part of&lt;BR /&gt;DEC/Compaq/HP/(whatever) C (other than its&lt;BR /&gt;name), but it may be that after 14 years with&lt;BR /&gt;no such changes, the time has come (or will&lt;BR /&gt;come before we're all dead).  I won't hold my&lt;BR /&gt;breath.</description>
      <pubDate>Wed, 07 Feb 2007 22:46:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/link-problem/m-p/3939775#M11482</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2007-02-07T22:46:30Z</dc:date>
    </item>
  </channel>
</rss>

