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

Help with -o

lindemer
Beginner
811 Views
Hello-

I am a newbie to Fortran, however familar with other languages, and have been quickly trying to learn how to run a makefile that had originally been created for linux (not my own). I would like to run this makefile on my Dell with Microsoft Windows XP x64 edition's with an Intel Visual Fortran Compiler 64, Version 10.1.021.

After changing a few parts (.o's to .obj's and -'s to /'s... ect.) I have been attepting to run the makefile with no luck.

The command I use to run it is

nmake /f Makefile.mak.

However I get the error:

"
/exe:lindemer

The filename, directory name, or volume label syntax is incorrect.
NMAKE : fatal error U1077: '' : return code '0x1'
Stop
"

I recently exchanged the -o with /exe: as you can see in my makefile.

I have been banging my head against the monitor for a while now trying to find where i am going wrong, and would greatly appreciate some guidence.

Thank you very much!
0 Kudos
5 Replies
Steven_L_Intel1
Employee
811 Views
I assume you figured out that -o is not supported on Windows. I am not an nmake expert but something strikes me as odd for your command to build the EXE. What's the output if you add /N ?
0 Kudos
TimP
Honored Contributor III
811 Views
gnu make is an easier switch, more compatible with linux usage. Add rules to deal with .obj and .exe and ifort option requirements:

FFLAGS = /assume:protect_parens,minus0,byterecl,buffered_io /Qprec-div /Qprec-sqrt

.SUFFIXES: .obj .exe

your.exe: 1.obj 2.obj
ifort $FFLAGS 1.obj 2.obj
mv 1.exe your.exe

.f.obj:
ifort $(FFLAGS) -c $*.f

or (choose one method)
your.exe: 1.o 2.o
ifort $(FFLAGS) /Fe$@.exe 1.o 2.o

.f.o:
ifort $(FFLAGS) -c $*.f
mv $*.obj $*.o

observing the gnu make rules where ctrl-T tabs are required, and likely no ctrl-R even at line ends.
If the Makefile relies on the linux convention where .F90 or .F implies pre-processing, it becomes more complicated, regardless of make utility, unless you can simply add /Qfpp to FFLAGS.
0 Kudos
lindemer
Beginner
811 Views
if i add the /N, the output is just

"
/exe:lindemer

"

however I am still unable to get the program to run at all. It is not even creating the obj files.

any other suggestions?

Thanky you very much.
0 Kudos
lindemer
Beginner
811 Views
I really appreciate the GNU assistance, however I attempted all suggestions with no luck. any other hints?
0 Kudos
Steven_L_Intel1
Employee
811 Views
Your makefile is not valid for nmake, as far as I can tell. For example, I think that:

%.obj %.mod: %.f90 
$(F90) /c $(F90FLAGS) $<

should be:

.f90 .obj:
$(F90) /c $(F90FLAGS) $<
.f90 .mod:
$(F90) /c $(F90FLAGS) $<


0 Kudos
Reply