Quantcast
Channel: Intel® Software - Intel® Fortran Compiler for Linux* and macOS*
Viewing all articles
Browse latest Browse all 2746

windows Vs linux command line

$
0
0

Dear all,

I am working on a project where I have 4 fortran files: A.f90 is the main subroutine in which I have the line

!DEC$ ATTRIBUTES DLLEXPORT::A

and where I call the 3 others modules (let's call them B_mod.f90 C_mod.f90 and D_mod.f90 ).

To compile them on windows (I want a .dll output file), I do:

>ifort /c B_mod.f90 C_mod.f90 D_mod.f90

and :

ifort /dll A.f90 B_mod.obj C_mod.obj D_mod.obj /link libai_analogy.lib libai_saber.lib /NODEFAULTLIB:LIBCMT.lib

That works well and I get my A.dll output file (~231ko), and works properly later when it is called by another program on windows.

Now I would like to do the same on linux (debian 9), so I do:

>ifort -c A.f90 B_mod.f90 C_mod.f90 D_mod.f90

>ifort -shared -o A.dll A.o B_mod.o C_mod.o D_mod.o -Xlinker libai_analogy.lib libai_saber.lib

At first sight, it compiles without any error message, however the output dll file is this time ~452ko, and is not working when I call him later.

Could you please tell me where I am doing something wrong, and how can I proceed properly with linux?

Thanks a lot for your help.


Viewing all articles
Browse latest Browse all 2746

Trending Articles



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