Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28442 Discussions

Use the command line to compile the dynamic link library

Dongmei
Novice
1,713 Views

Dear all,

I am a beginner, and I have a problem with compiling the dynamic link library using the command line. The problem and code are in the attachment. I don’t know the reason, could you help me solve it?

Sincerely,

Sun Dongmei

0 Kudos
1 Solution
andrew_4619
Honored Contributor II
1,647 Views

1] You need to create  CMD (command) window using the shortcuts in the Intel Fortran install. 

andrew_4619_0-1597830009606.png

2] the ifort command needs spaces between the options

It is not a version problem.

View solution in original post

0 Kudos
8 Replies
mecej4
Honored Contributor III
1,700 Views

Use the compiler options /fpp and /dll.

Dongmei
Novice
1,693 Views

Dear mecej4,

Thank you for your help.

Forgive me for not understanding, could you tell me the detailed operation or instruction?

Best regards,

Dongmei Sun

0 Kudos
mecej4
Honored Contributor III
1,684 Views

Use this command in an Intel Fortran command window:

ifort /fpp /dll dllsource1.for
Dongmei
Novice
1,672 Views

Dear mecej4,

Thank you very much for your help.

I used the command ,but that problem still occurs.

Best regards,

Dongmei Sun

0 Kudos
andrew_4619
Honored Contributor II
1,658 Views
Copyright (C) 2009-2020 Intel Corporation. All rights reserved.
Intel(R) Inspector 2020 (build 604266)
Copyright (C) 2009-2020 Intel Corporation. All rights reserved.
Intel(R) Advisor 2020 (build 605410)

Intel(R) MPI Library 2019 Update 7 for Windows* Target Build Environment for Intel(R) 64 applications
Copyright 2007-2020 Intel Corporation.

Copyright (C) 1985-2019 Intel Corporation. All rights reserved.
Intel(R) Compiler 19.1 Update 1 (package 216)

**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.9.22
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

C:\Program Files (x86)\IntelSWTools>cd \test

C:\test>ifort /fpp /dll dllsource1.for
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.1.216 Build 20200306
Copyright (C) 1985-2020 Intel Corporation.  All rights reserved.

Microsoft (R) Incremental Linker Version 14.16.27039.0
Copyright (C) Microsoft Corporation.  All rights reserved.

-out:dllsource1.dll
-dll
-implib:dllsource1.lib
dllsource1.obj
   Creating library dllsource1.lib and object dllsource1.exp

C:\test>
0 Kudos
Dongmei
Novice
1,650 Views

Dear andrew_4619,

Thank you for your help.

I changed the file path and still have this problem and I guess it may be a problem with the compiler version.Could you tell me the version you are using and could send me your compiled files?

Best regards,

Dongmei sun

0 Kudos
andrew_4619
Honored Contributor II
1,648 Views

1] You need to create  CMD (command) window using the shortcuts in the Intel Fortran install. 

andrew_4619_0-1597830009606.png

2] the ifort command needs spaces between the options

It is not a version problem.

0 Kudos
Dongmei
Novice
1,642 Views

Dear andrew_4619,

Thank you very mach,I am very excited that I successfully compiled it.

Sincerely,

Dongmei Sun

0 Kudos
Reply