<?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 Link C static library (.lib) into Fortran Application in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Link-C-static-library-lib-into-Fortran-Application/m-p/784824#M29543</link>
    <description>Hello,&lt;BR /&gt;&lt;BR /&gt;i have problems integrating C-static libs into a Fortran&lt;BR /&gt;Application. In the Fortran Code are several functions referenced.&lt;BR /&gt;For example:&lt;BR /&gt;   ...&lt;BR /&gt;   integer, external               :: pfopen&lt;BR /&gt;   ...&lt;BR /&gt;   File%unit = pfopen(n_name, File%name, File%mode)&lt;BR /&gt;   ...&lt;BR /&gt;&lt;BR /&gt;These functions are located in the C-static library (PACT-PDB, &lt;A href="http://pact.llnl.gov" target="_blank"&gt;http://pact.llnl.gov&lt;/A&gt; ). I have compiled the PACT-PDB and got several .lib files:&lt;BR /&gt;panacea.lib pdb.lib pgs.lib pml.lib ppc.lib scheme.lib scorelib sx.lib&lt;BR /&gt;&lt;BR /&gt;If i specify these libs under "Linker-&amp;gt;Additional Dependencies" i still get the following link errors:&lt;BR /&gt;&lt;BR /&gt;-----------------------&amp;lt;&lt;BR /&gt;------ Build started: Project: flmnav, Configuration: Debug|Win32 ------&lt;BR /&gt;&lt;BR /&gt;Linking...&lt;BR /&gt;Link /OUT:"Debug/flmnav.exe" /INCREMENTAL /NOLOGO /LIBPATH:"C:&amp;#0;1_UserchristianTUMDAvs_flmnavpactpactworkpactdevwinnt4.0lib" /NODEFAULTLIB:"libcmtd.lib" /DEBUG /PDB:"Debug/flmnav.pdb" /SUBSYSTEM:CONSOLE panacea.lib pdb.lib pgs.lib pml.lib ppc.lib scheme.lib score.lib sx.lib /C90&lt;BR /&gt; Debug/error.obj Debug/get_cpu_time.obj Debug/halt.obj Debug/hp_cpu_time.obj Debug/ijk_l123.obj Debug/l123_ijk.obj Debug/&amp;#8;asics.obj Debug/filemod.obj &lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;Debug/write_body.obj Debug/write_coeff.obj Debug/write_coeff_n.obj Debug/write_conv2.obj Debug/write_surf.obj Debug/wrparam.obj Debug/wrqnf_flow.obj Debug/wrqntecu_time.obj Debug/wrseglog.obj Debug/wrsurf_pdb.obj&lt;BR /&gt;Link: executing 'link'&lt;BR /&gt;LINK : warning LNK4044: unrecognized option '/C90'; ignored&lt;BR /&gt;filemod.obj : error LNK2019: unresolved external symbol _PFOPEN referenced in function _FILEMOD..OPEN_FILE&lt;BR /&gt;filemod.obj : error LNK2019: unresolved external symbol _PFCLOS referenced in function _FILEMOD..CLOSE_FILE&lt;BR /&gt;wrsurf_pdb.obj : error LNK2001: unresolved external symbol _PFGERR&lt;BR /&gt;filemod.obj : error LNK2019: unresolved external symbol _PFGERR referenced in function _FILEMOD..CLOSE_FILE&lt;BR /&gt;dbmmod.obj : error LNK2019: unresolved external symbol _PFGERR referenced in function _DBMMOD..WRPDB_DBM&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;Debug/flmnav.exe : fatal error LNK1120: 19 unresolved externals&lt;BR /&gt;&lt;BR /&gt;flmnav build failed.&lt;BR /&gt;-----------------------&amp;lt;&lt;BR /&gt;&lt;BR /&gt;I am using Visual Studio.Net 2003, Intel C++ 7.1 and Intel Fortran 7.1 (all for Windows).&lt;BR /&gt;Can anyone help me get out of this problem ?&lt;BR /&gt;&lt;BR /&gt;Thanks in advantage,&lt;BR /&gt;Christian&lt;BR /&gt;</description>
    <pubDate>Fri, 03 Oct 2003 22:40:16 GMT</pubDate>
    <dc:creator>mftech</dc:creator>
    <dc:date>2003-10-03T22:40:16Z</dc:date>
    <item>
      <title>Link C static library (.lib) into Fortran Application</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Link-C-static-library-lib-into-Fortran-Application/m-p/784824#M29543</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;i have problems integrating C-static libs into a Fortran&lt;BR /&gt;Application. In the Fortran Code are several functions referenced.&lt;BR /&gt;For example:&lt;BR /&gt;   ...&lt;BR /&gt;   integer, external               :: pfopen&lt;BR /&gt;   ...&lt;BR /&gt;   File%unit = pfopen(n_name, File%name, File%mode)&lt;BR /&gt;   ...&lt;BR /&gt;&lt;BR /&gt;These functions are located in the C-static library (PACT-PDB, &lt;A href="http://pact.llnl.gov" target="_blank"&gt;http://pact.llnl.gov&lt;/A&gt; ). I have compiled the PACT-PDB and got several .lib files:&lt;BR /&gt;panacea.lib pdb.lib pgs.lib pml.lib ppc.lib scheme.lib scorelib sx.lib&lt;BR /&gt;&lt;BR /&gt;If i specify these libs under "Linker-&amp;gt;Additional Dependencies" i still get the following link errors:&lt;BR /&gt;&lt;BR /&gt;-----------------------&amp;lt;&lt;BR /&gt;------ Build started: Project: flmnav, Configuration: Debug|Win32 ------&lt;BR /&gt;&lt;BR /&gt;Linking...&lt;BR /&gt;Link /OUT:"Debug/flmnav.exe" /INCREMENTAL /NOLOGO /LIBPATH:"C:&amp;#0;1_UserchristianTUMDAvs_flmnavpactpactworkpactdevwinnt4.0lib" /NODEFAULTLIB:"libcmtd.lib" /DEBUG /PDB:"Debug/flmnav.pdb" /SUBSYSTEM:CONSOLE panacea.lib pdb.lib pgs.lib pml.lib ppc.lib scheme.lib score.lib sx.lib /C90&lt;BR /&gt; Debug/error.obj Debug/get_cpu_time.obj Debug/halt.obj Debug/hp_cpu_time.obj Debug/ijk_l123.obj Debug/l123_ijk.obj Debug/&amp;#8;asics.obj Debug/filemod.obj &lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;Debug/write_body.obj Debug/write_coeff.obj Debug/write_coeff_n.obj Debug/write_conv2.obj Debug/write_surf.obj Debug/wrparam.obj Debug/wrqnf_flow.obj Debug/wrqntecu_time.obj Debug/wrseglog.obj Debug/wrsurf_pdb.obj&lt;BR /&gt;Link: executing 'link'&lt;BR /&gt;LINK : warning LNK4044: unrecognized option '/C90'; ignored&lt;BR /&gt;filemod.obj : error LNK2019: unresolved external symbol _PFOPEN referenced in function _FILEMOD..OPEN_FILE&lt;BR /&gt;filemod.obj : error LNK2019: unresolved external symbol _PFCLOS referenced in function _FILEMOD..CLOSE_FILE&lt;BR /&gt;wrsurf_pdb.obj : error LNK2001: unresolved external symbol _PFGERR&lt;BR /&gt;filemod.obj : error LNK2019: unresolved external symbol _PFGERR referenced in function _FILEMOD..CLOSE_FILE&lt;BR /&gt;dbmmod.obj : error LNK2019: unresolved external symbol _PFGERR referenced in function _DBMMOD..WRPDB_DBM&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;Debug/flmnav.exe : fatal error LNK1120: 19 unresolved externals&lt;BR /&gt;&lt;BR /&gt;flmnav build failed.&lt;BR /&gt;-----------------------&amp;lt;&lt;BR /&gt;&lt;BR /&gt;I am using Visual Studio.Net 2003, Intel C++ 7.1 and Intel Fortran 7.1 (all for Windows).&lt;BR /&gt;Can anyone help me get out of this problem ?&lt;BR /&gt;&lt;BR /&gt;Thanks in advantage,&lt;BR /&gt;Christian&lt;BR /&gt;</description>
      <pubDate>Fri, 03 Oct 2003 22:40:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Link-C-static-library-lib-into-Fortran-Application/m-p/784824#M29543</guid>
      <dc:creator>mftech</dc:creator>
      <dc:date>2003-10-03T22:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: Link C static library (.lib) into Fortran Application</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Link-C-static-library-lib-into-Fortran-Application/m-p/784825#M29544</link>
      <description>I can't find the description of these routines on the PACT web site.  I'm wondering if the library assumes that C and Fortran use the same calling conventions.  If these are C routines, Fortran is upcasing the names whereas C would leave the case alone.&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Fri, 03 Oct 2003 23:40:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Link-C-static-library-lib-into-Fortran-Application/m-p/784825#M29544</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2003-10-03T23:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Link C static library (.lib) into Fortran Application</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Link-C-static-library-lib-into-Fortran-Application/m-p/784826#M29545</link>
      <description>Hi Steve,&lt;BR /&gt;the libraries do work together with fortran. We have them already compiled on UNIX,Linux and VPP(Hitachi). They're simply named in the linker's parameter list. Here's the documentation for PACT usage withing Fortran under Linux:&lt;BR /&gt;&lt;BR /&gt;--&amp;gt;&lt;BR /&gt;Usage of PACT on the IA32 Linux Cluster&lt;BR /&gt;The PACT root directory (denoted as $PACTROOT in the following) is /usr/local/sys/lib/pact. You will need to set the following environment variables.  &lt;BR /&gt; export PATH=/usr/local/sys/lib/pact/bin:$PATH &lt;BR /&gt; export SCHEME=/usr/local/sys/lib/pact/scheme &lt;BR /&gt; export ULTRA=/usr/local/sys/lib/pact/scheme &lt;BR /&gt;&lt;BR /&gt;For building applications please add the include path &lt;BR /&gt;&lt;BR /&gt;icc -c ... -I$PACTROOT/include foo.c &lt;BR /&gt;&lt;BR /&gt;to the C Compiler call, and for linkage (some or all of) the PACT libraries are required: &lt;BR /&gt;&lt;BR /&gt;icc -o myprog ... -L$PACTROOT/lib -lpanacea -lpdb -lpgs -lpml -lppc -lpsmm -lscheme -lscore -lsx &lt;BR /&gt;&lt;BR /&gt;If you need to link in PACT libraries with the Fortran Compiler, please use the command line &lt;BR /&gt;efc -Vaxlib -o myprog ... -L$PACTROOT/lib -lpanacea -lpdb -lpgs -lpml -lppc -lpsmm -lscheme -lscore -lsx &lt;BR /&gt;--&amp;lt;&lt;BR /&gt;&lt;BR /&gt;In the file "PDFIA.C", the Fortran interface functions are defined.&lt;BR /&gt;&lt;BR /&gt;Under Windows (XP), i've tried alot of compiler-settings within Visual Studio.Net, but it's still stating that link error. &lt;BR /&gt;&lt;BR /&gt;Christian</description>
      <pubDate>Sat, 04 Oct 2003 04:50:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Link-C-static-library-lib-into-Fortran-Application/m-p/784826#M29545</guid>
      <dc:creator>mftech</dc:creator>
      <dc:date>2003-10-04T04:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: Link C static library (.lib) into Fortran Application</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Link-C-static-library-lib-into-Fortran-Application/m-p/784827#M29546</link>
      <description>My guess is a name mismatch.  Do a:&lt;BR /&gt;&lt;BR /&gt;dumpbin -symbols &lt;BR /&gt;&lt;BR /&gt;on each of the libraries and look for the routine names you want.  Are they uppercase or lowercase?&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Sat, 04 Oct 2003 05:15:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Link-C-static-library-lib-into-Fortran-Application/m-p/784827#M29546</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2003-10-04T05:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: Link C static library (.lib) into Fortran Application</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Link-C-static-library-lib-into-Fortran-Application/m-p/784828#M29547</link>
      <description>Finally, i got it working.&lt;BR /&gt;&lt;BR /&gt;I had to change the "External Procedure" settings to:&lt;BR /&gt;External Name Interpretation: Lower Case&lt;BR /&gt;Append Underscore to External Names: Yes.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Christian</description>
      <pubDate>Sat, 04 Oct 2003 22:20:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Link-C-static-library-lib-into-Fortran-Application/m-p/784828#M29547</guid>
      <dc:creator>mftech</dc:creator>
      <dc:date>2003-10-04T22:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: Link C static library (.lib) into Fortran Application</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Link-C-static-library-lib-into-Fortran-Application/m-p/784829#M29548</link>
      <description>Pretty much what I thought.  The C library was built assuming typical UNIX Fortran name decoration.  Often there's a symbol you can define in a header to change the name construction (upcase/downcase, append underscore or no, etc.)&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Sun, 05 Oct 2003 04:10:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Link-C-static-library-lib-into-Fortran-Application/m-p/784829#M29548</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2003-10-05T04:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Link C static library (.lib) into Fortran Application</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Link-C-static-library-lib-into-Fortran-Application/m-p/784830#M29549</link>
      <description>Correct,&lt;BR /&gt;i can now build the solution without any changes to the source code.&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;BR /&gt;Christian</description>
      <pubDate>Mon, 06 Oct 2003 14:04:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Link-C-static-library-lib-into-Fortran-Application/m-p/784830#M29549</guid>
      <dc:creator>mftech</dc:creator>
      <dc:date>2003-10-06T14:04:33Z</dc:date>
    </item>
  </channel>
</rss>

