Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

fortran invoking fortran dll LNK2019 problem on win7 64bit, decorate does not work

$
0
0

The code:


!foo.for

#define DLLIMPORT(name) _EXCLAMATIONDEC attributes dllimport,alias:#name::name

#define DLLEXPORT(name) _EXCLAMATIONDEC attributes dllexport,DECORATE,alias:#name::name 
      subroutine FOO()

      DLLEXPORT(FOO)

      end
!main.for

#define DLLIMPORT(name) _EXCLAMATIONDEC attributes dllimport,alias:#name::name

#define DLLEXPORT(name) _EXCLAMATIONDEC attributes dllexport,DECORATE,alias:#name::name 
      program main

      DLLIMPORT(FOO)

      call FOO

      end

compiled with ivf 2013 running on ia 32 with vs 2010.
the os is win7 64bit
it is compiled with option below to generate exclamation mark:
/fpp /D_EXCLAMATIONDEC=!DEC$

but when link an error occured:
error LNK2019: __imp__FOO

dumpbin -exports foo.lib:


File Type: LIBRARY
     Exports
       ordinal    name
                  _FOO
  Summary
          C0 .debug$S

          14 .idata$2

          14 .idata$3

           4 .idata$4

           4 .idata$5

           C .idata$6


dumpbin -exports foo.dll:

File Type: DLL
  Section contains the following exports for foo.dll
    00000000 characteristics

    53008ECE time date stamp Sun Feb 16 18:11:26 2014

        0.00 version

           1 ordinal base

           1 number of functions

           1 number of names
    ordinal hint RVA      name
          1    0 00001000 FOO
  Summary
        2000 .data

        2000 .rdata

        1000 .reloc

        5000 .text


Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>