<?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 You're using Windows, so a in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146641#M138766</link>
    <description>&lt;P&gt;You're using Windows, so a static library is a .lib, not a .a. Please ask your new question in the &lt;A href="https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows"&gt;WIndows forum&lt;/A&gt;. It has an answer, but it's not appropriate to prolong the unrelated discussion here.&lt;/P&gt;</description>
    <pubDate>Wed, 24 Oct 2018 14:59:17 GMT</pubDate>
    <dc:creator>Steve_Lionel</dc:creator>
    <dc:date>2018-10-24T14:59:17Z</dc:date>
    <item>
      <title>warning #5117: Bad # preprocessor line and fatal error LNK1107</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146627#M138752</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;When I compile ansys demo function ResRd Demo.F against its binlib.dll using ifort compiler,&lt;/P&gt;

&lt;P&gt;warning #5117: Bad#proprocessor line and fatal error LNK1107 happen. Detailed are in attachment.&lt;/P&gt;

&lt;P&gt;Is there something more I can do? Am I getting the flags wrong?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Song&lt;/P&gt;</description>
      <pubDate>Sun, 21 Oct 2018 03:59:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146627#M138752</guid>
      <dc:creator>shan__song</dc:creator>
      <dc:date>2018-10-21T03:59:16Z</dc:date>
    </item>
    <item>
      <title>This should have been posed</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146628#M138753</link>
      <description>&lt;P&gt;This should have been posed to the Windows forum, but I think you are confusing compilation and linking steps. You want to compile your demo file into an object file before linking it with an external library.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 20:58:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146628#M138753</guid>
      <dc:creator>Juergen_R_R</dc:creator>
      <dc:date>2018-10-22T20:58:03Z</dc:date>
    </item>
    <item>
      <title>In addition, you need to add</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146629#M138754</link>
      <description>&lt;P&gt;In addition, you need to add /fpp for #include lines to be recognized.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 23:38:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146629#M138754</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2018-10-22T23:38:20Z</dc:date>
    </item>
    <item>
      <title>Hello Steve and Juergen,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146630#M138755</link>
      <description>Hello Steve and Juergen,
Thank you so much for your responses. I appreciate it. I am new with ifort. This is the first time I use it. Should I do compilation and linking in two separate steps (compile ResRdDemo.F into ResRdDemo.o and then link it to the binlib.dll)? if yes, what are correct commands?

But when I try a command: "ifort /fpp ResRdDemo.F", output is as follows:
c:\Users\User\Desktop\bao\ansys\binlib\ifort-replyed&amp;gt;ifort /fpp ResRdDemo.F
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R
) 64, Version 18.0.5.274 Build 20180823
Copyright (C) 1985-2018 Intel Corporation.  All rights reserved.

computer.h(174): #warning: keyword redefined: FUNCTION
computer.h(175): #warning: keyword redefined: SUBROUTINE
.\impcom.inc(18): error #5082: Syntax error, found IDENTIFIER 'UNDEFINED' when e
xpecting one of: NONE TYPE INTEGER REAL COMPLEX BYTE CHARACTER CLASS DOUBLE DOUB
LECOMPLEX ...
      implicit undefined (a-z)
---------------^
.\impcom.inc(18): error #5136: Illegal syntax for IMPLICIT NONE statement.
      implicit undefined (a-z)
-------------------------^
.\impcom.inc(70): error #5082: Syntax error, found ',' when expecting one of: =&amp;gt;
 = . [ % ( :
      LONGINT BIGINT8,SMALLINT8,INT8_2,INT8_62,
---------------------^
.\impcom.inc(100): error #5082: Syntax error, found ',' when expecting one of: =
&amp;gt; = . [ % ( :
      PTRFTN     PTRFTNNULL, PTRZERO
---------------------------^
.\impcom.inc(101): error #6236: A specification statement cannot appear in the e
xecutable section.
      parameter (HEAPPTRNULL = SMALLINT+2,
------^
.\impcom.inc(109): error #6236: A specification statement cannot appear in the e
xecutable section.
      integer   EXPON, NEXPON
------^
.\impcom.inc(110): error #6236: A specification statement cannot appear in the e
xecutable section.
      parameter (EXPON=100, NEXPON=-100)
------^
.\impcom.inc(111): error #6236: A specification statement cannot appear in the e
xecutable section.
      double precision   TINY, HUGE
------^
.\impcom.inc(112): error #6236: A specification statement cannot appear in the e
xecutable section.
      parameter ( TINY=2.0d0**NEXPON, HUGE=2.0d0**EXPON )
------^
ResRdDemo.F(7): error #6236: A specification statement cannot appear in the exec
utable section.
      external  ResRdBegin, ResRdGeomBegin, ResRdGeomEnd,
------^
ResRdDemo.F(22): error #6236: A specification statement cannot appear in the exe
cutable section.
      integer   ResRdBegin, ResRdType, ResRdReal, ResRdCsys,
------^
ResRdDemo.F(30): error #6236: A specification statement cannot appear in the exe
cutable section.
      integer  MAXDOFSPERNODE, MAXNODESPERELEM, MAXREALS, MAXELERECORD
------^
ResRdDemo.F(31): error #6236: A specification statement cannot appear in the exe
cutable section.
      parameter (MAXDOFSPERNODE=32, MAXNODESPERELEM=24, MAXREALS=100,
------^
ResRdDemo.F(34): error #6236: A specification statement cannot appear in the exe
cutable section.
      integer  Nunit,Lunit,Units,NumDof,DOF(MAXDOFSPERNODE),UserCode,
------^
ResRdDemo.F(39): error #6236: A specification statement cannot appear in the exe
cutable section.
      integer  ielc(200), i, j, k, n, kerr, nodes(MAXNODESPERELEM),
------^
ResRdDemo.F(42): error #6236: A specification statement cannot appear in the exe
cutable section.
      character*4   DofLab(MAXDOFSPERNODE)
------^
ResRdDemo.F(43): error #6236: A specification statement cannot appear in the exe
cutable section.
      character*32  JobName
------^
ResRdDemo.F(44): error #6236: A specification statement cannot appear in the exe
cutable section.
      character*12  Fname
------^
ResRdDemo.F(45): error #6236: A specification statement cannot appear in the exe
cutable section.
      character*80  Title(5)
------^
ResRdDemo.F(46): error #6236: A specification statement cannot appear in the exe
cutable section.
      double precision  Rcon(MAXREALS), xyz(6), time,
------^
ResRdDemo.F(49): error #6236: A specification statement cannot appear in the exe
cutable section.
      character*3   EstrLab(25)
------^
ResRdDemo.F(50): error #6946: In this DATA statement, there are more values assi
gned to variables then there are variables.  There must be the same number of va
lues and variables.   ['ENF']
      data EstrLab /'EMS','ENF','ENS','ENG','EGR',
--------------------------^
.\impcom.inc(100): error #6793: The POINTER attribute is required.   [PTRFTNPTRF
TNNULL]
      PTRFTN     PTRFTNNULL, PTRZERO
------^
ResRdDemo.F(58): warning #6043: This Hollerith or character constant is too long
 and cannot be used in the current numeric context.   ['test.rst']
      Fname = 'test.rst'
--------------^
ResRdDemo.F(131): error #6410: This name has not been declared as an array or a
function.   [RCON]
            write (*,3023) i,n,(Rcon(j),j=1,n)
--------------------------------^
ResRdDemo.F(163): error #6423: This name has already been used as an external fu
nction name.   [XYZ]
            write (*,3041) n,xyz
-----------------------------^
ResRdDemo.F(189): error #6410: This name has not been declared as an array or a
function.   [NODES]
            write (*,3052) (nodes(j),j=1,n)
----------------------------^
ResRdDemo.F(278): error #6423: This name has already been used as an external fu
nction name.   [VALUES]
                     write (*,3078) i,j,values
----------------------------------------^
ResRdDemo.F(327): error #6410: This name has not been declared as an array or a
function.   [ESTRLAB]
                        write (*,9400) EstrLab(j),k,MAXELERECORD
---------------------------------------^
compilation aborted for ResRdDemo.F (code 1)

When I try a command:  "ifort /fpp ResRdDemo.F binlib.dll", output is as follows. Obviously, appending binlib.dll is incorrect.
c:\Users\User\Desktop\bao\ansys\binlib\ifort-replyed&amp;gt;ifort /fpp ResRdDemo.F binl
ib.dll
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R
) 64, Version 18.0.5.274 Build 20180823
Copyright (C) 1985-2018 Intel Corporation.  All rights reserved.
ifort: command line warning #10161: unrecognized source type 'binlib.dll'; objec
t file assumed

computer.h(174): #warning: keyword redefined: FUNCTION
computer.h(175): #warning: keyword redefined: SUBROUTINE
.\impcom.inc(18): error #5082: Syntax error, found IDENTIFIER 'UNDEFINED' when e
xpecting one of: NONE TYPE INTEGER REAL COMPLEX BYTE CHARACTER CLASS DOUBLE DOUB
LECOMPLEX ...
      implicit undefined (a-z)
---------------^
.\impcom.inc(18): error #5136: Illegal syntax for IMPLICIT NONE statement.
      implicit undefined (a-z)
......
Can you please show me a correct command line for this case?

Thank you once again,

Song</description>
      <pubDate>Tue, 23 Oct 2018 15:24:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146630#M138755</guid>
      <dc:creator>shan__song</dc:creator>
      <dc:date>2018-10-23T15:24:03Z</dc:date>
    </item>
    <item>
      <title>Without the source code it is</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146631#M138756</link>
      <description>&lt;P&gt;Without the source code it is not possible to really help you. A quick google search did not give links to the code you mentioned.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 15:35:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146631#M138756</guid>
      <dc:creator>Juergen_R_R</dc:creator>
      <dc:date>2018-10-23T15:35:38Z</dc:date>
    </item>
    <item>
      <title>Hello Juergen,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146632#M138757</link>
      <description>&lt;P&gt;Hello Juergen, Thank you for your quick reply. I really appreciate it. Source code is attached. Song&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 16:03:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146632#M138757</guid>
      <dc:creator>shan__song</dc:creator>
      <dc:date>2018-10-23T16:03:31Z</dc:date>
    </item>
    <item>
      <title>Ok, implicit undefined in</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146633#M138758</link>
      <description>&lt;P&gt;Ok, implicit undefined in impcom.inc is not valid Fortran. Maybe it is some extension for which you need to set a flag. When you try to find it, it could possibly be an Oracle extension or a VMS extension to F77, there could be a flag for the compiler to accept it, but neither gfortran, nor ifort nor nagfor accept it.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 16:34:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146633#M138758</guid>
      <dc:creator>Juergen_R_R</dc:creator>
      <dc:date>2018-10-23T16:34:51Z</dc:date>
    </item>
    <item>
      <title>IMPLICIT UNDEFINED is not</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146634#M138759</link>
      <description>&lt;P&gt;IMPLICIT UNDEFINED is not supported by Intel Fortran. I had never heard of it before - definitely not VMS. Interesting that the compiler recognizes it enough to give you the error, though. IMPLICIT NONE (without the letter range) is the correct syntax.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 16:41:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146634#M138759</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2018-10-23T16:41:22Z</dc:date>
    </item>
    <item>
      <title>Hello Steve and Juergen,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146635#M138760</link>
      <description>&lt;P&gt;Hello Steve and Juergen,&lt;/P&gt;

&lt;P&gt;Thanks for your responses. I absolutely believe that you are Drs. Fortran. Although I use ifort first time and I just join this forum for less than two days, I saw that both of you have resolved&amp;nbsp;many of issues on this forum before. &amp;nbsp;Before I join this forum, I have searched on implicit undefined (a-z). I just found oracle fortran 77 mentioned this (&lt;A href="https://docs.oracle.com/cd/E19957-01/805-4939/6j4m0vn9v/index.html"&gt;https://docs.oracle.com/cd/E19957-01/805-4939/6j4m0vn9v/index.html&lt;/A&gt;). I agree with you that implicit none is the correct syntax. Interesting that ifort compiler does not support implicit undefined(a-z) and ansys uses ifort compiler, how ansys passes its compilation. I also agree that it is some extension for setting a flag. My question is What flag for ifort compiler accept it?&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Song&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 19:50:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146635#M138760</guid>
      <dc:creator>shan__song</dc:creator>
      <dc:date>2018-10-23T19:50:59Z</dc:date>
    </item>
    <item>
      <title>Dear Song,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146636#M138761</link>
      <description>&lt;P&gt;Dear Song,&lt;/P&gt;

&lt;P&gt;thanks for the flowers, but I am convinced that it is hubris to see myself mentioned in the same league with Steve. I would consider myself only as a gifted amateur.&lt;/P&gt;

&lt;P&gt;Cheers,&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Juergen&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 19:56:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146636#M138761</guid>
      <dc:creator>Juergen_R_R</dc:creator>
      <dc:date>2018-10-23T19:56:00Z</dc:date>
    </item>
    <item>
      <title>I got the source to compile.</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146637#M138762</link>
      <description>&lt;P&gt;I got the source to compile. Here's what I did:&lt;/P&gt;

&lt;P&gt;In inpcom.h, replaced the invalid IMPLICIT lines with IMPLICIT NONE&lt;/P&gt;

&lt;P&gt;Added the options:&lt;/P&gt;

&lt;P&gt;/fpp /DPCWINNT_SYS /DSYSTEM_FLOAT_H&lt;/P&gt;

&lt;P&gt;I don't know what SYSTEM_FLOAT_H means here, just that defining it means that it doesn't look for a float.h that was not provided.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 20:27:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146637#M138762</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2018-10-23T20:27:26Z</dc:date>
    </item>
    <item>
      <title>Hello Steve and Juergen,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146638#M138763</link>
      <description>&lt;P&gt;Hello Steve and Juergen,&lt;/P&gt;

&lt;P&gt;Thank both of you so much. I really appreciate your help. According to Steve's instruction, the problem is resolved. In addition, as Juergen pointed out that&amp;nbsp;I confuse the compilation and linking. please allow me&amp;nbsp;to have a naïve question: Can I use /link option directly link to binlib.dll with ifort?&amp;nbsp;I try it and failed. So I convert&amp;nbsp;a&amp;nbsp;dll to a lib and then compile them. Furthermore, I also try gfortran. gfortran compiles it successfully via converting functions to small cases and appending underscore . When running the exe file created by gfortran, it fails to load functions. I saw somewhere that&amp;nbsp;ifort and gfortran&amp;nbsp;are compatible. maybe it is incorrect.&lt;/P&gt;

&lt;P&gt;thank you once again.&lt;/P&gt;

&lt;P&gt;Song&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2018 04:36:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146638#M138763</guid>
      <dc:creator>shan__song</dc:creator>
      <dc:date>2018-10-24T04:36:07Z</dc:date>
    </item>
    <item>
      <title>Song, gfortran and Ifort</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146639#M138764</link>
      <description>&lt;P&gt;Song, gfortran and Ifort libraries are not binary-compatible.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2018 11:30:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146639#M138764</guid>
      <dc:creator>Juergen_R_R</dc:creator>
      <dc:date>2018-10-24T11:30:09Z</dc:date>
    </item>
    <item>
      <title>Hello Juergen,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146640#M138765</link>
      <description>&lt;P&gt;Hello Juergen,&lt;/P&gt;

&lt;P&gt;Thanks. Is there any means to covert libraries each other, for example, from *.dll to *.a&amp;nbsp;and vice versa.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Song&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2018 14:41:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146640#M138765</guid>
      <dc:creator>shan__song</dc:creator>
      <dc:date>2018-10-24T14:41:12Z</dc:date>
    </item>
    <item>
      <title>You're using Windows, so a</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146641#M138766</link>
      <description>&lt;P&gt;You're using Windows, so a static library is a .lib, not a .a. Please ask your new question in the &lt;A href="https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows"&gt;WIndows forum&lt;/A&gt;. It has an answer, but it's not appropriate to prolong the unrelated discussion here.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2018 14:59:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146641#M138766</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2018-10-24T14:59:17Z</dc:date>
    </item>
    <item>
      <title>Sorry for I have found</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146642#M138767</link>
      <description>&lt;P&gt;Sorry for I have found Windows forum before.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2018 15:12:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/warning-5117-Bad-preprocessor-line-and-fatal-error-LNK1107/m-p/1146642#M138767</guid>
      <dc:creator>shan__song</dc:creator>
      <dc:date>2018-10-24T15:12:29Z</dc:date>
    </item>
  </channel>
</rss>

