- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm currently driving the ifort command from a script (tcl/tk). Although I have it working there are two problems that I'd like to sort out:
- I have to run the script from a shortcut (or bat file) that sets up the ifort vars, is it possible to get the environment variables without DOS?
- when ifort runs it briefly creates many DOS windows, how should I invoke the ifort command so that this doesn't happen? The problem seems to be being caused by fortcom.exe.
Thanks,
Simon
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm not sure what you mean by "without DOS" since there is no DOS. If you're using a command script, it needs to run in an environment where the ifortvars.bat has been called. You could manually add them to the system PATH, INCLUDE and LIB variables, but I don't recommend this.
If the compiler is run from a non-console window, then Windows will create a console window for its output. You can redirect that output elsewhere.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I now have a solution to this problem courtesy of Arjen Markus on comp.lang.tcl . His solution is to write the compile command to a .bat file and then execute that file (rather than running the compiler directly). This works - no more annoying windows. FYI my script now uses
[tcl]
proc buildExe {args} {
variable copts
# Create a temporary .bat file
set of [lindex $args 0]
set bfile "build_${of}.bat"
set fh [open $bfile w]
puts $fh "ifort $copts /Fe$of.exe [lrange $args 1 end]"
close $fh
# Run the build
set haveError [catch {eval exec -- $bfile} res]
file delete -- $bfile
if {$haveError} {
return -code error $res
}
return $res
}
[/tcl]
Simon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems there is no syntax highlighting for tcl, any chance of adding support for it?
Thanks, Simon

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