<?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: Creating Static Library and Linking in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Creating-Static-Library-and-Linking/m-p/899341#M80449</link>
    <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/66713"&gt;linda@lawrie.com&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;P&gt;&lt;BR /&gt;When I did this recently (all through the IDE), I just added the lib to my fortran project.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Linda&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;I suggest adding the path of the ifconsol library to the link command.&lt;/P&gt;
&lt;P&gt;Tung.&lt;/P&gt;</description>
    <pubDate>Sun, 23 Nov 2008 22:19:13 GMT</pubDate>
    <dc:creator>tung_nguyen</dc:creator>
    <dc:date>2008-11-23T22:19:13Z</dc:date>
    <item>
      <title>Creating Static Library and Linking</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Creating-Static-Library-and-Linking/m-p/899339#M80447</link>
      <description>&lt;P&gt;I am using Intel Fortran 9.1 and VC++ 2005.&lt;/P&gt;
&lt;P&gt;I have two programs&lt;/P&gt;
&lt;P&gt; PROGRAM main&lt;BR /&gt; write(*,*)"Calling C Function"&lt;BR /&gt; CALL ChgStr()&lt;BR /&gt; write(*,*)"Back From C Function"&lt;BR /&gt; END PROGRAM main&lt;/P&gt;
&lt;P&gt;#include&lt;STDLIB.H&gt;&lt;BR /&gt;#include&lt;STDIO.H&gt;&lt;BR /&gt;void chgstr()&lt;BR /&gt;{&lt;BR /&gt; printf("\nIn C function");&lt;BR /&gt;}&lt;/STDIO.H&gt;&lt;/STDLIB.H&gt;&lt;/P&gt;
&lt;P&gt;I would like to create a static library of C program and use it for fortran executable.&lt;/P&gt;
&lt;P&gt;Please suggest how to do it.&lt;/P&gt;
&lt;P&gt;I did the following.&lt;/P&gt;
&lt;P&gt;cl -c chgstr.c&lt;BR /&gt;created a object file chgstr.obj&lt;/P&gt;
&lt;P&gt;lib /out:clib.lib chgstr.obj&lt;BR /&gt;created static library for chgstr.obj&lt;/P&gt;
&lt;P&gt;ifort /names:lowercase /extend_source -c fmain.f&lt;BR /&gt;created fmain.obj&lt;/P&gt;
&lt;P&gt;ifort fmain.obj clib.lib&lt;BR /&gt;(to create executable of fmain.obj clib.lib but gave following error)&lt;BR /&gt;Intel Fortran Compiler for Intel EM64T-based applications, Version 9.1 Build 20070109&lt;BR /&gt;Copyright (C) 1985-2007 Intel Corporation. All rights reserved.&lt;/P&gt;
&lt;P&gt;Fatal error cannot open "ifconsol"&lt;BR /&gt;ifort: error: problem during multi-file optimization compilation (code 1)&lt;/P&gt;
&lt;P&gt;tried with the link command&lt;BR /&gt;link /out:1.exe fmain.obj clib.lib &lt;BR /&gt;gave the following error&lt;BR /&gt;Microsoft  Incremental Linker Version 8.00.50727.42&lt;BR /&gt;Copyright (C) Microsoft Corporation. All rights reserved.&lt;/P&gt;
&lt;P&gt;LINK : fatal error LNK1104: cannot open file 'ifconsol.lib'&lt;/P&gt;
&lt;P&gt;Please suggest how to do.&lt;/P&gt;
&lt;P&gt;Is there a way I can do it through IDE (VS2005)&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Chandra&lt;/P&gt;</description>
      <pubDate>Fri, 21 Nov 2008 12:29:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Creating-Static-Library-and-Linking/m-p/899339#M80447</guid>
      <dc:creator>acobulareddy</dc:creator>
      <dc:date>2008-11-21T12:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Static Library and Linking</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Creating-Static-Library-and-Linking/m-p/899340#M80448</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;When I did this recently (all through the IDE), I just added the lib to my fortran project.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Linda&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Nov 2008 20:16:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Creating-Static-Library-and-Linking/m-p/899340#M80448</guid>
      <dc:creator>lklawrie</dc:creator>
      <dc:date>2008-11-22T20:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Static Library and Linking</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Creating-Static-Library-and-Linking/m-p/899341#M80449</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/66713"&gt;linda@lawrie.com&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;P&gt;&lt;BR /&gt;When I did this recently (all through the IDE), I just added the lib to my fortran project.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Linda&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;I suggest adding the path of the ifconsol library to the link command.&lt;/P&gt;
&lt;P&gt;Tung.&lt;/P&gt;</description>
      <pubDate>Sun, 23 Nov 2008 22:19:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Creating-Static-Library-and-Linking/m-p/899341#M80449</guid>
      <dc:creator>tung_nguyen</dc:creator>
      <dc:date>2008-11-23T22:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Static Library and Linking</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Creating-Static-Library-and-Linking/m-p/899342#M80450</link>
      <description>&lt;DIV style="margin:0px;"&gt;May I know the procedure you have followed to add it through IDE.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;What is the version of VS you have. I have VS2005, Does it have the capability&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/66713"&gt;linda@lawrie.com&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;P&gt;&lt;BR /&gt;When I did this recently (all through the IDE), I just added the lib to my fortran project.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Linda&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Nov 2008 12:14:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Creating-Static-Library-and-Linking/m-p/899342#M80450</guid>
      <dc:creator>acobulareddy</dc:creator>
      <dc:date>2008-11-24T12:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Static Library and Linking</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Creating-Static-Library-and-Linking/m-p/899343#M80451</link>
      <description>&lt;DIV style="margin:0px;"&gt;tried the folliowing&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;C:Documents and Settings105032692DesktopDesktopc-fortran1&amp;gt;link /out:1.exe fmain.obj clib.lib "C:Program FilesIntelCompilerFortran9.1ItaniumLibifconsol.lib"&lt;BR /&gt;Microsoft  Incremental Linker Version 8.00.50727.42&lt;BR /&gt;Copyright (C) Microsoft Corporation. All rights reserved.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;LINK : fatal error LNK1561: entry point must be defined&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;still it is not working.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/271396"&gt;tung.nguyen@l-3com.com&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;I suggest adding the path of the ifconsol library to the link command.&lt;/P&gt;
&lt;P&gt;Tung.&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Nov 2008 12:21:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Creating-Static-Library-and-Linking/m-p/899343#M80451</guid>
      <dc:creator>acobulareddy</dc:creator>
      <dc:date>2008-11-24T12:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Static Library and Linking</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Creating-Static-Library-and-Linking/m-p/899344#M80452</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/407518"&gt;acobulareddy&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;tried the folliowing&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;C:Documents and Settings105032692DesktopDesktopc-fortran1&amp;gt;link /out:1.exe fmain.obj clib.lib "C:Program FilesIntelCompilerFortran9.1ItaniumLibifconsol.lib"&lt;BR /&gt;Microsoft  Incremental Linker Version 8.00.50727.42&lt;BR /&gt;Copyright (C) Microsoft Corporation. All rights reserved.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;LINK : fatal error LNK1561: entry point must be defined&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;still it is not working.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;In your original post you indicated that you were using the EM64T compiler but here I see you referencing Itanium libraries. These are not the same! What kind of system are you building for?&lt;/P&gt;
&lt;P&gt;I recommend using the ifort command to link.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Nov 2008 13:57:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Creating-Static-Library-and-Linking/m-p/899344#M80452</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-11-24T13:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Static Library and Linking</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Creating-Static-Library-and-Linking/m-p/899345#M80453</link>
      <description>&lt;DIV style="margin:0px;"&gt;even I tried with IA32 and got the same error&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;C:Documents and Settings105032692DesktopDesktopc-fortran1&amp;gt;link /out:1.exe fmain.obj clib.lib "C:Program FilesIntelCompilerFortran&lt;BR /&gt;9.1IA32Libifconsol.lib"&lt;BR /&gt;Microsoft  Incremental Linker Version 8.00.50727.42&lt;BR /&gt;Copyright (C) Microsoft Corporation. All rights reserved.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;LINK : fatal error LNK1561: entry point must be defined&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;I am more interested with link because VS uses LINK command to create executable (VS uses ifort only for creating objects)&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;even I tried with ifort O gpt the following errors&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;C:Documents and Settings105032692DesktopDesktopc-fortran1&amp;gt;ifort fmain.obj clib.lib /exe:fmain.exe&lt;BR /&gt;Intel Fortran Compiler for 32-bit applications, Version 9.1 Build 20061103Z Package ID: W_FC_C_9.1.033&lt;BR /&gt;Copyright (C) 1985-2006 Intel Corporation. All rights reserved.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Microsoft  Incremental Linker Version 8.00.50727.42&lt;BR /&gt;Copyright (C) Microsoft Corporation. All rights reserved.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;-out:fmain.exe&lt;BR /&gt;-subsystem:console&lt;BR /&gt;fmain.obj&lt;BR /&gt;clib.lib&lt;BR /&gt;fmain.obj : error LNK2019: unresolved external symbol __intel_new_proc_init referenced in function MAIN__&lt;BR /&gt;fmain.obj : error LNK2019: unresolved external symbol for_set_reentrancy referenced in function MAIN__&lt;BR /&gt;fmain.obj : error LNK2019: unresolved external symbol for_write_seq_lis referenced in function MAIN__&lt;BR /&gt;fmain.obj : error LNK2019: unresolved external symbol CHGSTR referenced in function MAIN__&lt;BR /&gt;LINK : error LNK2001: unresolved external symbol mainCRTStartup&lt;BR /&gt;fmain.exe : fatal error LNK1120: 5 unresolved externals&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;I tried by changing the case of CHGSTR in C function. that is also not eliminating the unresolved symbol CHGSTR referenced in function main.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/336209"&gt;Steve Lionel (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;In your original post you indicated that you were using the EM64T compiler but here I see you referencing Itanium libraries. These are not the same! What kind of system are you building for?&lt;/P&gt;
&lt;P&gt;I recommend using the ifort command to link.&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Nov 2008 14:42:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Creating-Static-Library-and-Linking/m-p/899345#M80453</guid>
      <dc:creator>acobulareddy</dc:creator>
      <dc:date>2008-11-24T14:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Static Library and Linking</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Creating-Static-Library-and-Linking/m-p/899346#M80454</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;It would help if I could see all the commands used to build this application. There's something wrong in either the environment or an inconsistency in the build commands but I am not seeing everything. Part of the problem is that there is nothing supplying the main entry point (which is typically in a C run-time library. I am also puzzled by the routine names shown in the linker errors as it looks as if they are EM64T references. You cannot mix architectures - you must be consistent in the tools you use.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Nov 2008 15:13:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Creating-Static-Library-and-Linking/m-p/899346#M80454</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-11-24T15:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Static Library and Linking</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Creating-Static-Library-and-Linking/m-p/899347#M80455</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;SPAN style="color: #0860a8;"&gt;acobulareddy&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;P&gt;You are getting the error with ifconsol.lib because you might be trying to link in the normal command prompt window.&lt;/P&gt;
&lt;P&gt;Try to do the link in the Intel IA-32 command prompt.&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Kameswara Sarma&lt;/P&gt;
&lt;DIV style="margin:0px;"&gt;&lt;BR /&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 03 Dec 2008 09:39:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Creating-Static-Library-and-Linking/m-p/899347#M80455</guid>
      <dc:creator>sarma_amras</dc:creator>
      <dc:date>2008-12-03T09:39:34Z</dc:date>
    </item>
  </channel>
</rss>

