home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 14 Text / 14-Text.zip / C6_BUGS.ZIP / C6_20067.BUG < prev    next >
Text File  |  1990-09-11  |  2KB  |  63 lines

  1. Q62184 L2025: __fltin with Mixed-Language FORTRAN 5.00 and C 6.00
  2. Microsoft C Compiler (C)
  3. 6.00   | 6.00
  4. MS-DOS | OS/2
  5.  
  6. Question:
  7.  
  8. Why do I get an L2025 multiply-defined symbol error when I link
  9. together a FORTRAN version 5.00 and a C version 6.00 program? The
  10. symbol is __fltin.
  11.  
  12. Sample Code
  13. -----------
  14.  
  15. C   FORTRAN MODULE
  16.       INTERFACE TO SUBROUTINE FOO [C, ALIAS:'_foo'] (N)
  17.       INTEGER*2 N
  18.       END
  19. C   Force a read of a double
  20.       READ(*,*)DXL
  21.       CALL FOO (3)
  22.       END
  23.  
  24. // C Module
  25.  
  26. void foo (int x)
  27. {
  28.    double j = 3.0 ;
  29. }
  30.  
  31. More Information:
  32.  
  33. The following are the build options:
  34.  
  35.    fl /AL /c /FPi fortran.for
  36.    cl /AL /c /FPi c.c
  37.    link /nod /noe fortran c, foo.exe,,llibce llibfore ;
  38.  
  39. The FORTRAN library (llibfore) was created with C compatibility, and
  40. llibce is a C version 6.00 library.
  41.  
  42. The linker responds with the following message:
  43.  
  44.    llibfore.lib(\mrt\c\cfin.ASM) : error L2025: __fltin : symbol
  45.    defined more than once
  46.  
  47.    There were 2 errors detected
  48.  
  49. Under DOS, this does not appear to affect the executable in any way.
  50.  
  51. Under OS/2, the resulting executable gives SYS0192 when you attempt to
  52. run it, telling you that there was an error during link time and the
  53. operating system refuses to run the program.
  54.  
  55. Microsoft has confirmed this to be a problem with C version 6.00. We
  56. are researching this problem and will post new information here as it
  57. becomes available.
  58.  
  59. Keywords:  buglist6.00
  60.  
  61. COPYRIGHT Microsoft Corporation, 1990.
  62. Updated  90/07/18 05:34
  63.