 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
davidglo
Joined: 18 Nov 2008 Posts: 1 Location: University of Leeds
|
Posted: Wed Nov 26, 2008 4:25 pm Post subject: launch arguments not recognized in VS 2005 |
|
|
Hello,
i have the following problem, which seems like it may be a bug. i found a 2006 post on this issue, and the problem was reported as solved; however, it does not appear to be solved.
i am using Visual Studio 2005 (Win32) to do debugging on a Fortran program, which requires processing of an input file (fortran unit 5) called
acet.inp
the program compiles fine from within VS2005 using the Silverfrost FTN compiler, version 5.2.1, and i can step through the program using break points and 'run to cursor'; however, when the program is required to read some data from unit 5, it just hangs and does nothing despite the fact that i have specified the following launch arguments
< acet.inp > acet.out
if i execute the program, called VGROW, from the command line in the Win32 directory using the following
VGROW < acet.inp > acet.out
then the program executes fine, and reads the input file appropriately. it is only during debugging that the executable isnt finding the launch arguments.
i have found a fix to this problem by changing the source code to point to the location of acet inp, i.e., OPEN(5,FILE="path/filename", etc...). with this change, then everything works fine during debugging, and the input file is processed. it is only when i am trying to specify input using the launch arguments that i have problems.
additionally, i have noticed that if i change the launch arguments, and then want to begin debugging afresh, the source is recompiled, which seems rather unecessary.
any advice or any information on what i am doing wrong would be very much appreciated. as i said, i have gotten it to work by changing the source code to explicitly locate unit 5, but i would like to understand why the launch arguments are not being recognized.
thanks very much,
Dr David Glowacki |
|
Back to top |
|
 |
Sebastian
Joined: 20 Feb 2008 Posts: 177
|
Posted: Fri Nov 28, 2008 10:46 am Post subject: |
|
|
The parameters are not parsed by the command shell, thus input/output redirection is not available.
You could try changing the startup string from "myapp.exe" to "cmd.exe /c myapp.exe" but I don't know if this'll work (especially whether the MSVC debugger likes that). |
|
Back to top |
|
 |
Andrew
Joined: 09 Sep 2004 Posts: 232 Location: Frankfurt, Germany
|
Posted: Mon Dec 08, 2008 12:17 pm Post subject: |
|
|
I believe the problem here is related to the redirection of input and output, which is only indirectly related to launch arguments actually being passed to the program. As the previous poster describes, when you use redirection operators from the command line, then the shell deals with the redirection. This is not currently possible inside the Visual Studio environment, so the workaround is to attach the file as you have done. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|