<?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 to call a fortran code from a c code?? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-call-a-fortran-code-from-a-c-code/m-p/2605440#M725969</link>
    <description>The HP C and FORTRAN manuals at docs.hp.com&lt;BR /&gt;have extensive info on using C and FORTRAN&lt;BR /&gt;together.&lt;BR /&gt;&lt;BR /&gt;CFLAGS_HPUX11= +z -O&lt;BR /&gt;FFLAGS_HPUX11=  +z -O&lt;BR /&gt;LDFLAGS_HPUX11= -a shared&lt;BR /&gt;LIBS_HPUX11= -lcl -lm -lc&lt;BR /&gt;&lt;BR /&gt;The linker will warn you if you need to change the&lt;BR /&gt;+z options to +Z.&lt;BR /&gt;&lt;BR /&gt;The SGI compiler most likely adds underscores&lt;BR /&gt;to FORTRAN symbol names, so you may need&lt;BR /&gt;to add +ppu to FFLAGS.  Check the f77 or f90&lt;BR /&gt;man page to see what the default is for your&lt;BR /&gt;compiler.&lt;BR /&gt;&lt;BR /&gt;For some reason the HP-UX FORTRAN&lt;BR /&gt;runtime library is called "libcl", hence the "-lcl".&lt;BR /&gt;The "-lc" is the C runtime library and is usually&lt;BR /&gt;automatically added by the linker, but I guess it&lt;BR /&gt;doesn't hurt to say it explicitly.&lt;BR /&gt;</description>
    <pubDate>Thu, 01 Nov 2001 18:56:53 GMT</pubDate>
    <dc:creator>Gregory Fruth</dc:creator>
    <dc:date>2001-11-01T18:56:53Z</dc:date>
    <item>
      <title>How to call a fortran code from a c code??</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-call-a-fortran-code-from-a-c-code/m-p/2605439#M725968</link>
      <description>I tried to call a Fortran code from a C code. A makefile&lt;BR /&gt;was written for that purpose in the past, but it is specifically for SGI machine&lt;BR /&gt;with irix6r10. Is there anyone who knows how to change the  following variables:&lt;BR /&gt;&lt;BR /&gt; CFLAGS_HPUX11=&lt;BR /&gt; FFLAGS_HPUX11=&lt;BR /&gt; LDFLAGS_HPUX11=&lt;BR /&gt; LIBS_HPUX11=&lt;BR /&gt;&lt;BR /&gt;such that they are equilavent to&lt;BR /&gt;&lt;BR /&gt; CFLAGS_IRIX6R10= -KPIC -O -n32&lt;BR /&gt; FFLAGS_IRIX6R10= -O -KPIC -n32 &lt;BR /&gt; LDFLAGS_IRIX6R10= -shared -n32 &lt;BR /&gt; LIBS_IRIX6R10= -lftn -lm -lc&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Thu, 01 Nov 2001 02:51:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-call-a-fortran-code-from-a-c-code/m-p/2605439#M725968</guid>
      <dc:creator>Genong Li</dc:creator>
      <dc:date>2001-11-01T02:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to call a fortran code from a c code??</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-call-a-fortran-code-from-a-c-code/m-p/2605440#M725969</link>
      <description>The HP C and FORTRAN manuals at docs.hp.com&lt;BR /&gt;have extensive info on using C and FORTRAN&lt;BR /&gt;together.&lt;BR /&gt;&lt;BR /&gt;CFLAGS_HPUX11= +z -O&lt;BR /&gt;FFLAGS_HPUX11=  +z -O&lt;BR /&gt;LDFLAGS_HPUX11= -a shared&lt;BR /&gt;LIBS_HPUX11= -lcl -lm -lc&lt;BR /&gt;&lt;BR /&gt;The linker will warn you if you need to change the&lt;BR /&gt;+z options to +Z.&lt;BR /&gt;&lt;BR /&gt;The SGI compiler most likely adds underscores&lt;BR /&gt;to FORTRAN symbol names, so you may need&lt;BR /&gt;to add +ppu to FFLAGS.  Check the f77 or f90&lt;BR /&gt;man page to see what the default is for your&lt;BR /&gt;compiler.&lt;BR /&gt;&lt;BR /&gt;For some reason the HP-UX FORTRAN&lt;BR /&gt;runtime library is called "libcl", hence the "-lcl".&lt;BR /&gt;The "-lc" is the C runtime library and is usually&lt;BR /&gt;automatically added by the linker, but I guess it&lt;BR /&gt;doesn't hurt to say it explicitly.&lt;BR /&gt;</description>
      <pubDate>Thu, 01 Nov 2001 18:56:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-call-a-fortran-code-from-a-c-code/m-p/2605440#M725969</guid>
      <dc:creator>Gregory Fruth</dc:creator>
      <dc:date>2001-11-01T18:56:53Z</dc:date>
    </item>
  </channel>
</rss>

