<?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: Fatal error cannot open &amp;quot;LIBC&amp;quot; in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fatal-error-cannot-open-quot-LIBC-quot/m-p/829309#M51577</link>
    <description>&lt;P&gt;/F is an ifort switch. The equivalent linker switch is /stack. But /stack is meaningless when building a DLL - I'm not sure if that's what you're doing.&lt;/P&gt;
&lt;P&gt;The linker warning 4217 can be ignored. It is saying that you have a DLLIMPORT for a symbol that is defined in the DLL. This is common when building Fortran DLLs and is harmless.&lt;/P&gt;</description>
    <pubDate>Sun, 25 Mar 2007 15:15:28 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2007-03-25T15:15:28Z</dc:date>
    <item>
      <title>Fatal error cannot open "LIBC"</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fatal-error-cannot-open-quot-LIBC-quot/m-p/829306#M51574</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am quite new to fortran. I have a intel fortran 9.1 version on win32 XP OS. I had also installed MS Visual studio 2005 before installing fortran IA-32.&lt;/P&gt;
&lt;P&gt;Its working fine in the case of simple fortran codes like finding out volume of sphere etc. I can execute them from Visual studio as well as command line in the build environment.&lt;/P&gt;
&lt;P&gt;But when I try to execute a code (say file.f90) which has to run along with a set of object files in the same directory I get the error message......(Unlike the previous case I use nmake here).&lt;/P&gt;
&lt;P&gt;Fatal error cannot open "LIBC"&lt;BR /&gt;ifort: error: problem during multi-file optimization compilation (code 1)&lt;BR /&gt;NMAKE : fatal error U1077: 'ifort' : return code '0x1'&lt;BR /&gt;Stop.&lt;/P&gt;
&lt;P&gt;I am able to get file.obj. But I guess the problem arises when it tries to link file.obj and other object files. I have even tried to set ignore libc library in the linker(from previous posts). It doesnt work.&lt;/P&gt;
&lt;P&gt;I have pasted makefile below..........&lt;/P&gt;
&lt;P&gt;#&lt;BR /&gt;# Makefile for building ls971&lt;BR /&gt;# on 'Windows '&lt;BR /&gt;# for diuble precision SMPD&lt;BR /&gt;ls971: dyn21.obj &lt;BR /&gt;ifort -q -o ls971 dyn21.obj &lt;BR /&gt;libdyna.lib libansysdp.lib shell32.lib /F:10000000 -link -force -nodefaultlib:msvcrt.lib&lt;BR /&gt;dyn21.obj: dyn21.f&lt;BR /&gt;ifort -c -W0 -WB -unroll -Qfp_port -G7 -4Yportlib -Qfpp2 /assume:byterecl /fltconsistency &lt;BR /&gt;-DPCWIN -DINTEL -DOPENMP -Qopenmp -DAUTODOUBLE -4R8 -4I8 -QxK dyn21.f&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I would really appreciate any help here. Thanks.&lt;/P&gt;
&lt;P&gt;Madhav.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2007 08:49:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Fatal-error-cannot-open-quot-LIBC-quot/m-p/829306#M51574</guid>
      <dc:creator>vivitsa</dc:creator>
      <dc:date>2007-03-23T08:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error cannot open "LIBC"</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fatal-error-cannot-open-quot-LIBC-quot/m-p/829307#M51575</link>
      <description>&lt;P&gt;VS2005 does not provide libc.lib - this is explained in the Intel Fortran Compiler Release Notes. I would guess that the libraries you are linking to were built with an earlier version of Visual C++ so they reference libc.lib. For static libraries, only the multithread version (libcmt.lib) is available. The Fortran compiler will default to /MT when it has been installed specifying command-line compatibility with VS2005.&lt;/P&gt;
&lt;P&gt;Unfortunately, it is generally not just a case of telling the linker to ignore libc, as with C/C++, the compiler generates different code for single and multithread code, or static and DLL.&lt;/P&gt;
&lt;P&gt;You can try using /nodefaultlib:libc.lib, but you say it doesn't work. I'm not sure why that would be, perhaps you did not specify it in the right place.&lt;/P&gt;
&lt;P&gt;I am always uncomfortable when I see /nodefaultliib and /force in a build script - they're usually covering up for mistakes made elsewhere.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2007 14:51:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Fatal-error-cannot-open-quot-LIBC-quot/m-p/829307#M51575</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2007-03-23T14:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error cannot open "LIBC"</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fatal-error-cannot-open-quot-LIBC-quot/m-p/829308#M51576</link>
      <description>I added /nodefaultlib to my makefile. Its working now. Previously I changed the property settings in MS VS 2005 &lt;STRONG&gt;Configuration Properties | Linker | Input&lt;/STRONG&gt;. Set &lt;STRONG&gt;Ignore specific library&lt;/STRONG&gt; to libc. And I was running from command line. Thats why I guess it didnt work. Thanks a lot for your inputs steve. &lt;BR /&gt;&lt;BR /&gt;But I get a warning message&lt;BR /&gt;&lt;BR /&gt;LINK : warning LNK4044: unrecognized option '/F:10000000'; ignored&lt;BR /&gt;libansysdp.lib(lm_new.obj) : warning LNK4217: locally defined symbol _time imported in function _l_buf_2&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Can I ignore them? Or is there anything that should be done to supress them. &lt;BR /&gt;&lt;BR /&gt;Madhav.&lt;BR /&gt;</description>
      <pubDate>Sun, 25 Mar 2007 08:53:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Fatal-error-cannot-open-quot-LIBC-quot/m-p/829308#M51576</guid>
      <dc:creator>vivitsa</dc:creator>
      <dc:date>2007-03-25T08:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error cannot open "LIBC"</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fatal-error-cannot-open-quot-LIBC-quot/m-p/829309#M51577</link>
      <description>&lt;P&gt;/F is an ifort switch. The equivalent linker switch is /stack. But /stack is meaningless when building a DLL - I'm not sure if that's what you're doing.&lt;/P&gt;
&lt;P&gt;The linker warning 4217 can be ignored. It is saying that you have a DLLIMPORT for a symbol that is defined in the DLL. This is common when building Fortran DLLs and is harmless.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Mar 2007 15:15:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Fatal-error-cannot-open-quot-LIBC-quot/m-p/829309#M51577</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2007-03-25T15:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error cannot open "LIBC"</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fatal-error-cannot-open-quot-LIBC-quot/m-p/829310#M51578</link>
      <description>Thanks once again steve. /stack supressed the error.  &lt;BR /&gt;&lt;BR /&gt;Madhav.&lt;BR /&gt;</description>
      <pubDate>Sun, 25 Mar 2007 18:40:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Fatal-error-cannot-open-quot-LIBC-quot/m-p/829310#M51578</guid>
      <dc:creator>vivitsa</dc:creator>
      <dc:date>2007-03-25T18:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error cannot open</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fatal-error-cannot-open-quot-LIBC-quot/m-p/829311#M51579</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/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;P&gt;VS2005 does not provide libc.lib - this is explained in the Intel Fortran Compiler Release Notes. I would guess that the libraries you are linking to were built with an earlier version of Visual C++ so they reference libc.lib. For static libraries, only the multithread version (libcmt.lib) is available. The Fortran compiler will default to /MT when it has been installed specifying command-line compatibility with VS2005.&lt;/P&gt;
&lt;P&gt;Unfortunately, it is generally not just a case of telling the linker to ignore libc, as with C/C++, the compiler generates different code for single and multithread code, or static and DLL.&lt;/P&gt;
&lt;P&gt;You can try using /nodefaultlib:libc.lib, but you say it doesn't work. I'm not sure why that would be, perhaps you did not specify it in the right place.&lt;/P&gt;
&lt;P&gt;I am always uncomfortable when I see /nodefaultliib and /force in a build script - they're usually covering up for mistakes made elsewhere.&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Could you please tell me where exactly should I put /nondefaultlib:libc.lib&lt;BR /&gt;I inserted it in the following statement; it is not working though. Is this the right usage of this switch?&lt;BR /&gt; &lt;BR /&gt;ifort -q -o ls971 dyn21.obj libdyna.lib libansysdp.lib shell32.lib /F:10000000 -link -force -nondefaultlib:libc.lib -nodefaultlib:msvcrt.lib&lt;BR /&gt;&lt;BR /&gt;Thank you in advance,&lt;BR /&gt;Aref&lt;BR /&gt;</description>
      <pubDate>Mon, 18 May 2009 02:59:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Fatal-error-cannot-open-quot-LIBC-quot/m-p/829311#M51579</guid>
      <dc:creator>aref_tehranian</dc:creator>
      <dc:date>2009-05-18T02:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error cannot open</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fatal-error-cannot-open-quot-LIBC-quot/m-p/829312#M51580</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/428527"&gt;aref_tehranian&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 id="quote_reply" style="width: 100%; margin-top: 5px; height: 0pt;"&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
ifort -q -o ls971 dyn21.obj libdyna.lib libansysdp.lib shell32.lib /F:10000000 -link -force -nondefaultlib:libc.lib -nodefaultlib:msvcrt.lib&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Why do you spell it more than one way? nodefaultlib seems to work for you.&lt;BR /&gt;As you are linking libansys, you should be paying for a license and support, so this is not the place for advice.&lt;BR /&gt;</description>
      <pubDate>Mon, 18 May 2009 04:30:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Fatal-error-cannot-open-quot-LIBC-quot/m-p/829312#M51580</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2009-05-18T04:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error cannot open</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fatal-error-cannot-open-quot-LIBC-quot/m-p/829313#M51581</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
Please note that the spelling of the switch is "nodefaultlib", not "noNdefaultlib".&lt;BR /&gt;</description>
      <pubDate>Mon, 18 May 2009 13:29:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Fatal-error-cannot-open-quot-LIBC-quot/m-p/829313#M51581</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-05-18T13:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error cannot open</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fatal-error-cannot-open-quot-LIBC-quot/m-p/829314#M51582</link>
      <description>Thank you steve. I used the following code and it still gives me "cannot find LIBC" error:&lt;BR /&gt;&lt;BR /&gt;ifort -w -q -o ls971.exe dyn21.obj dyn21b.obj libdyna.lib libansys.lib shell32.lib -link -force -nodefaultlib:libc.lib -nodefaultlib:msvcrt.lib&lt;BR /&gt;&lt;BR /&gt;Am I using this switch in the right place?&lt;BR /&gt;</description>
      <pubDate>Mon, 18 May 2009 19:29:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Fatal-error-cannot-open-quot-LIBC-quot/m-p/829314#M51582</guid>
      <dc:creator>aref_tehranian</dc:creator>
      <dc:date>2009-05-18T19:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error cannot open</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fatal-error-cannot-open-quot-LIBC-quot/m-p/829315#M51583</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
You are using it in the right place. Adding -verbose at the end would give you some diagnostic output saying where the various requests for libraries are coming from. I'm unsure why -nodefaultlib is not working for you.&lt;BR /&gt;&lt;BR /&gt;However, I recommend getting a version of the libraries you're using that are compatible with VS2005 or VS2008.&lt;BR /&gt;</description>
      <pubDate>Mon, 18 May 2009 20:47:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Fatal-error-cannot-open-quot-LIBC-quot/m-p/829315#M51583</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-05-18T20:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error cannot open</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fatal-error-cannot-open-quot-LIBC-quot/m-p/829316#M51584</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/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; However, I recommend getting a version of the libraries you're using that are compatible with VS2005 or VS2008.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Or, obtain and follow the recommendations of the software vendor. &lt;BR /&gt;</description>
      <pubDate>Mon, 18 May 2009 21:12:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Fatal-error-cannot-open-quot-LIBC-quot/m-p/829316#M51584</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2009-05-18T21:12:46Z</dc:date>
    </item>
  </channel>
</rss>

