- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
os: windows 7 ultimate 64
compiler: intel fortran compiler v11.1 64 {C:\Program Files (x86)\Intel\Compiler\11.1\054\bin\intel64}
set the appropriate environment variables by executing the file 'ifortvars.bat' and 'ifortvars_intel64.bat'
But when building the code fromMS-DOS window(start-cmd), the error as following:
D:\antarctica\mean12m>ifort nFileBlockMean.f90
Intel Visual Fortran Intel 64 Compiler Professional for applications runni
ng on Intel 64, Version 11.1 Build 20091130 Package ID: w_cprof_p_11.1.054
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
link: missing operand after `@C:\\Users\\cia\\AppData\\Local\\Temp\\32323arg'
Try `link --help' for more information.
D:\antarctica\mean12m>
How can iovercome this error?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Steve,
Yes , It is ok after running "C:Program Files (x86)IntelCompiler11.154binifortvars.bat intel64" in cmd-windows,but if close the windows and reenter the cmd windows, it must be reload the "ifortvars.bat intel64", otherwise the link error is same as before.Maybe the environment is not correcty set by ifortvars.bat intel64,It is betterto usethe intel fortran shell than this methods.
Thanks!
I think your expectations are slightly wrong.
Opening (or re-opening)a cmd window does just that. The only environment variables set will be those that are part of your System Properties (see Control Panel)
Running the ifortvars batch file in that cmd window then adds to the environment variables those required for the compiler and Visual Studio FOR THATCMD WINDOW ONLY. Close the cmd window and the settings dissappear too.
That is why, when building applications, it is advisable to use the Intel cmd shell which automatically sets the compiler and linker setings for you. Note however that when you close this window the settings dissappear as well. Opening a non-Intel cmd window afterwardsdoes not remember the ifortvars settings.
I suggest you open a cmd window and type
set
This will list the environment variables for that window
Now open an Intel cmd window and again type the set command
You will see the difference in the variables settings
Les
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
os: windows 7 ultimate 64
compiler: intel fortran compiler v11.1 64 {C:Program Files (x86)IntelCompiler11.154binintel64}
set the appropriate environment variables by executing the file 'ifortvars.bat' and 'ifortvars_intel64.bat'
But when building the code fromMS-DOS window(start-cmd), the error as following:
D:antarcticamean12m>ifort nFileBlockMean.f90
Intel Visual Fortran Intel 64 Compiler Professional for applications runni
ng on Intel 64, Version 11.1 Build 20091130 Package ID: w_cprof_p_11.1.054
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
link: missing operand after `@C:\Users\cia\AppData\Local\Temp\32323arg'
Try `link --help' for more information.
D:antarcticamean12m>
How can iovercome this error?
Thanks!
Use the commands
Start / Programs / Intel Software Development Tools / Intel Visual Fortran Comiler ... / Fotran Build Environment ...
this will start a command window with all of the required paths set up for the compiler and linker
If you use Start cmd then you need to run the ifortvars command every time you open the command window otherwise the paths are not set correctly.
Regards,
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use the commands
Start / Programs / Intel Software Development Tools / Intel Visual Fortran Comiler ... / Fotran Build Environment ...
this will start a command window with all of the required paths set up for the compiler and linker
If you use Start cmd then you need to run the ifortvars command every time you open the command window otherwise the paths are not set correctly.
Regards,
David
Yes, thanks!
The intel compiler shell cmd is ok,but I want to know how can I build program in MS-DOS cmd not in / Programs / Intel Software Development Tools / Intel Visual Fortran Comiler ... / Fotran Build Environment ...
so I can build program easily when right click any folder--->open command windows here (open the folder in a MS-DOS window).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The "compiler command shell" is simply a normal command prompt window which has run ifortvars.bat. There is no such thing as an "MS-DOS window", really - they're all command prompt windows. If you would prefer to start your own command prompt window, just CALL the appropriate ifortvars.bat file passing it the "ia32" or "intel64" argument as desired for your target platform.
It would probably be easier to just use the provided shortcut.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The "compiler command shell" is simply a normal command prompt window which has run ifortvars.bat. There is no such thing as an "MS-DOS window", really - they're all command prompt windows. If you would prefer to start your own command prompt window, just CALL the appropriate ifortvars.bat file passing it the "ia32" or "intel64" argument as desired for your target platform.
It would probably be easier to just use the provided shortcut.
Thanks Steve & tim18,
I add a pop upmenuby right-click foldersto open a 'MS-DOS window' include the ifortvars_intel64.bat, which can work now.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTFoldershellCmdPrompt]
@="open a cmd window"
[HKEY_CLASSES_ROOTFoldershellCmdPromptCommand]
@="C:WindowsSysWOW64cmd.exe /E:ON /V:ON /K cd %l&&"C:Program Files (x86)IntelCompiler11.154binintel64ifortvars_intel64.bat" "
But from start-cmd it can not to build:
d:antarcticamean12m>ifort
Intel Visual Fortran Intel 64 Compiler Professional for applications runni
ng on Intel 64, Version 11.1 Build 20091130 Package ID: w_cprof_p_11.1.054
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
ifort: command line error: no files specified; for help type "ifort /help"
d:antarcticamean12m>ifort nFileBlockMean.f90
Intel Visual Fortran Intel 64 Compiler Professional for applications runni
ng on Intel 64, Version 11.1 Build 20091130 Package ID: w_cprof_p_11.1.054
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
link: missing operand after `@C:\Users\cia\AppData\Local\Temp\32843arg'
Try `link --help' for more information.
d:antarcticamean12m>
Maybe the environment variables in ifortvars.bat are not correctly preset.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
d:antarcticamean12m>ifort
Intel Visual Fortran Intel 64 Compiler Professional for applications runni
ng on Intel 64, Version 11.1 Build 20091130 Package ID: w_cprof_p_11.1.054
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
ifort: command line error: no files specified; for help type "ifort /help"
d:antarcticamean12m>ifort nFileBlockMean.f90
Intel Visual Fortran Intel 64 Compiler Professional for applications runni
ng on Intel 64, Version 11.1 Build 20091130 Package ID: w_cprof_p_11.1.054
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
link: missing operand after `@C:\Users\cia\AppData\Local\Temp\32843arg'
Try `link --help' for more information.
d:antarcticamean12m>
Maybe the environment variables in ifortvars.bat are not correctly preset.No the messages are correct.
For the first "ifort" you did not specify a file to compile.
The second "ifort"tries to doa compile and link.
If youonly want to compile a filethen you need
ifort /c
If you are linking to make an exe or a lib then you need to addlots more information to the ifort command.
Why do you not use a Visual Studio solutionfile? then from the command line you would use
devenv
where
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you also try a simple "Hello world" application? Something is not going right in the invocation of the linker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you also show us the value of the TEMP environment variable(s) on your system?
You can do this with the SET command, which will display all environment variables.
Then just copy the values for TEMP, TMP, and TMPDIR into a reply tothis note.
thanks --
- Lorri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you also show us the value of the TEMP environment variable(s) on your system?
You can do this with the SET command, which will display all environment variables.
Then just copy the values for TEMP, TMP, and TMPDIR into a reply tothis note.
thanks --
- Lorri
Thanks Lorri,
TEMP=C:UsersciaAppDataLocalTemp
TMP=C:UsersciaAppDataLocalTemp
and there is no TMPDIR.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No the messages are correct.
For the first "ifort" you did not specify a file to compile.
The second "ifort"tries to doa compile and link.
If youonly want to compile a filethen you need
ifort /c
If you are linking to make an exe or a lib then you need to addlots more information to the ifort command.
Why do you not use a Visual Studio solutionfile? then from the command line you would use
devenv
where
Les
Dear Les,
ifort /c nFileBlockMean.f90 is ok, output nFileBlockMean.obj.
D:antarcticamean12m>ifort /c nFileBlockMean.f90
Intel Visual Fortran Intel 64 Compiler Professional for applications running on Intel 64, V
ersion 11.1 Build 20091130 Package ID: w_cprof_p_11.1.054
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
but:
D:antarcticamean12m>ifort nFileBlockMean.f90 /exe:nFileBlockMean.exe
Intel Visual Fortran Intel 64 Compiler Professional for applications running on Intel 64, V
ersion 11.1 Build 20091130 Package ID: w_cprof_p_11.1.054
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
link: missing operand after `@C:\Users\cia\AppData\Local\Temp\47963arg'
Try `link --help' for more information.
thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Shi,
Please show the output when /#x is used. This will show us exactly what is being passed to the linker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you also try a simple "Hello world" application? Something is not going right in the invocation of the linker.
The simple 'Hello world' is the same problem. I am baffled why can't build from ms-dos window.
D:antarcticamean12m>ifort /c hello.f90
Intel Visual Fortran Intel 64 Compiler Professional for applications running on Intel 64, V
ersion 11.1 Build 20091130 Package ID: w_cprof_p_11.1.054
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
D:antarcticamean12m>ifort hello.obj
Intel Visual Fortran Intel 64 Compiler Professional for applications running on Intel 64, V
ersion 11.1 Build 20091130 Package ID: w_cprof_p_11.1.054
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
link: missing operand after `@C:\Users\cia\AppData\Local\Temp\39687arg'
Try `link --help' for more information.
D:antarcticamean12m>ifort /exe:hello hello.obj
Intel Visual Fortran Intel 64 Compiler Professional for applications running on Intel 64, V
ersion 11.1 Build 20091130 Package ID: w_cprof_p_11.1.054
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
link: missing operand after `@C:\Users\cia\AppData\Local\Temp\42247arg'
Try `link --help' for more information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PLEASE show us the output when you add /#x to the ifort command! For example:
ifort /#x hello.f90
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PLEASE show us the output when you add /#x to the ifort command! For example:
ifort /#x hello.f90
Thanks! the output as follows:
D:antarcticamean12m>ifort /#x hello.f90
Intel Visual Fortran Intel 64 Compiler Professional for applications running on Intel 64,
ersion 11.1 Build 20091130 Package ID: w_cprof_p_11.1.054
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
C:PROGRA~2IntelCompiler11.154binintel64fortcom
-D__INTEL_COMPILER=1110
-D_MT
-D_M_AMD64
-D_M_X64
-D_WIN64
-D_WIN32
-D__INTEL_COMPILER_BUILD_DATE=20091130
-mGLOB_pack_sort_init_list
-I.
-IC:PROGRA~2IntelCompiler11.154includeintel64
-O2
-mP1OPT_version=11.1-intel64
-mGLOB_diag_file=hello.diag
-mGLOB_source_language=GLOB_SOURCE_LANGUAGE_F90
-mGLOB_tune_for_fort
-mGLOB_use_fort_dope_vector
-mP2OPT_static_promotion
-mP1OPT_print_version=FALSE
-mP3OPT_use_mspp_call_convention
-mGLOB_options_string=-#x
-mGLOB_cxx_limited_range=FALSE
-mP3OPT_defaultlibs_omit=FALSE
-mP3OPT_defaultlibs=P3OPT_DEFAULTLIBS_STATIC_MULTITHREAD
-mP3OPT_defaultlibs_select=P3OPT_DEFAULTLIBS_SELECT_F90_IVF
-mP3OPT_defaultlibs_f90_port
-mP1OPT_check_stack
-mP3OPT_inline_alloca
-mGLOB_routine_pointer_size_64
-mGLOB_split_functions=0
-mIPOPT_activate
-mIPOPT_lite
-mGLOB_machine_model=GLOB_MACHINE_MODEL_EFI2
-mGLOB_extended_instructions=0x8
-mP2OPT_gen_read_only_strings=TRUE
-mP2OPT_subs_out_of_bound=FALSE
-mGLOB_ansi_alias
-mIPOPT_args_in_regs=0
-mPGOPTI_value_profile_use=T
-mP2OPT_hlo_level=2
-mP2OPT_hlo
-mIPOPT_obj_output_file_name=hello.obj
-mGLOB_os_target=GLOB_OS_TARGET_WINNT
-mP3OPT_asm_target=P3OPT_ASM_TARGET_MASM5
-mP3OPT_obj_target=P3OPT_OBJ_TARGET_NTCOFF
-mGLOB_obj_output_file=hello.obj
-mGLOB_source_dialect=GLOB_SOURCE_DIALECT_FORTRAN
-mP1OPT_source_file_name=hello.f90
hello.f90
link
-out:hello.exe
-subsystem:console
hello.obj
link: missing operand after `@C:\Users\cia\AppData\Local\Temp\11243arg'
Try `link --help' for more information.
del C:UsersciaAppDataLocalTemp11242arg
del C:UsersciaAppDataLocalTemp11243arg
D:antarcticamean12m>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh, I see. You have something other than the Microsoft linker being found as "link" - looks like some UNIX-type utility. How did you establish this command windiow environment?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh, I see. You have something other than the Microsoft linker being found as "link" - looks like some UNIX-type utility. How did you establish this command windiow environment?
Dear Steve,
I set up the command windows environment by running the ifortvars.bat batch file(C:Program Files (x86)IntelCompiler11.154binintel64ifortvars_intel64.bat) and my os include the GnuWind32.
From win->start->cmd:
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:Userscia>link
link: missing operand
Try `link --help' for more information.
C:Userscia>link --help
Usage: link FILE1 FILE2
or: link OPTION
Call the link function to create a link named FILE2 to an existing FILE1.
--help display this help and exit
--version output version information and exit
Report bugs to
C:Userscia>link --version
link (GNU coreutils) 5.3.0
Written by Michael Stone.
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
C:Userscia>
But another PC without Gnuwind32:
C:Userscia>link
'link' is not recognized as an internal or external command,
operable program or batch file.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are not properly establishing the Intel compiler environment because you ran the wrong bat file. Please use this instead:
C:Program Files (x86)IntelCompiler11.154binifortvars.bat intel64
Note that the "intel64" argument is required. The file you ran does not set up the Visual Studio environment including the linker, so you got the Gnu linker instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are not properly establishing the Intel compiler environment because you ran the wrong bat file. Please use this instead:
C:Program Files (x86)IntelCompiler11.154binifortvars.bat intel64
Note that the "intel64" argument is required. The file you ran does not set up the Visual Studio environment including the linker, so you got the Gnu linker instead.
Dear Steve,
Yes , It is ok after running "C:Program Files (x86)IntelCompiler11.154binifortvars.bat intel64" in cmd-windows,but if close the windows and reenter the cmd windows, it must be reload the "ifortvars.bat intel64", otherwise the link error is same as before.Maybe the environment is not correcty set by ifortvars.bat intel64,It is betterto usethe intel fortran shell than this methods.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Steve,
Yes , It is ok after running "C:Program Files (x86)IntelCompiler11.154binifortvars.bat intel64" in cmd-windows,but if close the windows and reenter the cmd windows, it must be reload the "ifortvars.bat intel64", otherwise the link error is same as before.Maybe the environment is not correcty set by ifortvars.bat intel64,It is betterto usethe intel fortran shell than this methods.
Thanks!
I think your expectations are slightly wrong.
Opening (or re-opening)a cmd window does just that. The only environment variables set will be those that are part of your System Properties (see Control Panel)
Running the ifortvars batch file in that cmd window then adds to the environment variables those required for the compiler and Visual Studio FOR THATCMD WINDOW ONLY. Close the cmd window and the settings dissappear too.
That is why, when building applications, it is advisable to use the Intel cmd shell which automatically sets the compiler and linker setings for you. Note however that when you close this window the settings dissappear as well. Opening a non-Intel cmd window afterwardsdoes not remember the ifortvars settings.
I suggest you open a cmd window and type
set
This will list the environment variables for that window
Now open an Intel cmd window and again type the set command
You will see the difference in the variables settings
Les

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page