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

Compile .F with #includes .h files into 64-bit .dll

leeportnoff
Beginner
565 Views

I compiled this program with an early 32-bit version of Visual Fortran. I forget how, but it wasn't difficult.

#include "cfx5ext.h"

dllexport(pt_mom_drag)

SUBROUTINE PT_MOM_DRAG(NLOC,NRET,NARG,RET,ARG,CRESLT,

& CZ,DZ,IZ,LZ,RZ)

CC

..

..

(The .h file is in the same directory as the .F file)

Visual Studio 8 with visual fortran 11.1 gives; #error: can't find included file: cfx5ext.h

command line 'ifort /libs:dll /shared pt_mom_drag.F' gives; warning #5117: Bad # preprocessor line

0 Kudos
2 Replies
Steven_L_Intel1
Employee
565 Views
On Windows, you need to add /fpp to get the #include line to be recognized. You probably enabled the preprocessor in Visual Studio. It will look for #include files in the same places it looks for INCLUDE files - and why not use INCLUDE?
0 Kudos
leeportnoff
Beginner
565 Views
Still having errors with /fpp. What worked for me is to remove the include command and to copy .h files to project 'source files' directory.
0 Kudos
Reply