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

Simple Win App example in CVF - A Guide to Creating Windows Applications

coulteraqs
Beginner
1,656 Views
This is my first post on this forum, and I hope this is the right/best place for this.

I'm trying to come up to speed in creating simple Windows apps associated w/ Fortran routines and have upgraded my Compaq Visual Fortran with the Intel compiler and it has worked well.

I am using the book:
Compaq Visual Fortran - A Guide to Creating Windows Applications by Norman Lawrence (2002).

In Chapter 6 are instructions for creating a simple app that displays "Hello Win". This is a Fortran Windows App. using the Single Document Interface (SDI). The project gets created OK but then comes the instruction to "Select Build and then click Execute HelloWin.exe. A warning message is displayed stating that the file does not exist and asks you if you want to build it. Select Yes, and after successfully compiling and linking ..." the display depicted will appear.

The problem is that a warning message does not appear. Instead, 30 error messages appear and compilation is impossible!

Worse, I even downloaded pre-packaged projects from Elsevier (publisher) that go w/ each chapter in this book and the result is the same w/ this project. It will not compile.

FWIW, the first wrror message is:
Error: This module file was not generated by any release of this compiler. [USER32]
use user32

Is anyone familiar w/ Lawrence's book and has anyone tried to create the simple Windows App. he describes in Chapter 6?

Any help is appreciated.
0 Kudos
8 Replies
Steven_L_Intel1
Employee
1,656 Views

You have a DF98INCLUDE folder in the Intel Fortran INCLUDE path. Which version of Intel Visual Fortran are you using?

In Visual Studio, select Tools > Options > Intel Visual Fortran > Compilers. Click on the ... button to the right of Includes. If there are any lines that include DF98, remove them. Then click OK, OK and try building again.
0 Kudos
TommyCee
Beginner
1,656 Views

You have a DF98INCLUDE folder in the Intel Fortran INCLUDE path. Which version of Intel Visual Fortran are you using?

In Visual Studio, select Tools > Options > Intel Visual Fortran > Compilers. Click on the ... button to the right of Includes. If there are any lines that include DF98, remove them. Then click OK, OK and try building again.
Hey Steve - nice to see you're still kicking around after all these years. Thanks for entertaining my post.

My CVF is updated thru v6.6x, and I've imported the Intel 7.1 compiler (via Tools | Customize; click the Add-ins & Macro Files). You may recall you coached me on this procedure. ( I realize it's a little dated, and something of a Frankenstein.)

In your note, you said to do:
Tools > Options > Intel Visual Fortran > Compilers.

Actually, when I do:
Tools | Options

"Intel Visual Fortran" is not one of the tabs. However, under the tab "Directories", I see:
C:Program FilesCompiler70IA32Include
C:Program FilesMicrosoft Visual StudioVC98Include
C:Program FilesMicrosoft Visual StudioDF98Include


Does this tell you anything?
0 Kudos
Steven_L_Intel1
Employee
1,656 Views
It tells me you're using an ancient Intel compiler that doesn't support any of this.
0 Kudos
TommyCee
Beginner
1,656 Views
It tells me you're using an ancient Intel compiler that doesn't support any of this.

Well, the book and its examples were presumably created to work successfully and the one I tried was right "out of the box" (no fancy mods, etc.). Is it possible that the addition of the Intel compiler as I have done may be causing the problem? In other words, if I were to reinstall CVF w/o the addition of the Intel compiler at all - might that do the trick?

Just trying to figure out what I can to do follow the examples in Lawrence's guide (and build some very simple Windows apps).
0 Kudos
Steven_L_Intel1
Employee
1,656 Views

The book was written for Compaq Visual Fortran. It pretty much works for Intel Visual Fortran too, but that's not what you're using. Intel Visual Fortran started with version 8 - you have the old Intel Fortran Compiler for Windows which did not provide Win32 modules and is a very different implementation.
0 Kudos
TommyCee
Beginner
1,656 Views

The book was written for Compaq Visual Fortran. It pretty much works for Intel Visual Fortran too, but that's not what you're using. Intel Visual Fortran started with version 8 - you have the old Intel Fortran Compiler for Windows which did not provide Win32 modules and is a very different implementation.

In the Preface, it says "you will need access to a standard version of CVF 6.6" and that "most of the examples were originally created in CVF 6.1 ..." As such, there should be no problem. Again (and this is only as a novice), my hunch is that something in the interaction w/ the Intel Fortran compiler (7.1) may somehow be interfering w/ things.

Just to get me out of the woods, I may try re-installing CVF and stop short of adding in the Intel compiler build tool.

If this doesn't work, another idea might be to attach a zipped project and see if you could simply verify that it'll compile/build w/o errors. If so, I may - at long last - be forced to bite the bullet and go for an Intel VS package. I don't see a way to attach files here (the Add Files button above didn't seen to have this purpose); is that an option?
0 Kudos
Steven_L_Intel1
Employee
1,656 Views
It's very simple. Intel Fortran 7.1 is not compatible with CVF. It doesn't include the Win32 interface modules that CVF did, such as USER32, and does not recognize CVF's modules. You cannot use IFC 7.1 as a substitute for CVF.

If you wish to use an Intel compiler for this, Intel Visual Fortran 11.1 is the proper choice.
0 Kudos
TommyCee
Beginner
1,656 Views

The book was written for Compaq Visual Fortran. It pretty much works for Intel Visual Fortran too, but that's not what you're using. Intel Visual Fortran started with version 8 - you have the old Intel Fortran Compiler for Windows which did not provide Win32 modules and is a very different implementation.

OK - finally got it. This is a final post on this topic, which integrates the lessons of this thread and I hope may be pragmatic for any others who may find themselves in my shoes:

For those attempting to work the simple example projects provided in Chapter 6 of Norman Lawrence's Compaq Digital Fortran - A Guide to Creating Windows Applications (2002), then addition of the Intel 7.1 compiler to CVF 6.6x imposes a show-stopping influence that prevents successful compilation. Surprisingly (at least to me), I could not remove this influence by going into Tools | Customize | Add-ins & Macro Files and unclicking Intel Fortran Compiler Build Tool.

So - using a different Windows machine, I installed from scratch CVF thru v6.6C and stopped short of installing the "old" Intel Fortran Compiler (v7.1). Once this was done, I attempted to compile/build the simplest example project provided in Chapter 6 of the CVF Guide: HelloWin. This time, the compile & build were flawless! (Indeed, it must be that the old Intel Fortran Compiler for Windows does not provide Win32 modules, etc., as Steve said.)

Setting up CFV in this way (w/o Intel) will enable you to do the exercises and hopefully learn simple WinApp development.

Steve's other point, however, is well taken: Intel VF 11.1 would probaly do hte trick quite nicely, and remains a good investment for those who want to go that route. I'm sure this is a good product, comes w/ good support, and I may well go there myself in due time.
0 Kudos
Reply