Sorry for the delay in responding, I had to go to the doctors. I have been trying to get rid of an annoying case of bronchitis. It would help if it would just get warm some time soon.
Quote:
Originally Posted by
Corona688
It'd help if you answered some of my questions too...
Did I miss something somewhere? I thought I answered everything.
Maybe I wasn't clear in the original post. The issue is not with the output that the program is supposed to make, which goes to the output file (and is working properly), but with additional print statements that I have added for debugging purposes. Since I can't get fortran to work with gdb, I am stuck without a debugger/IDE and have to debug by adding print statements to the code in very, very, old school fashion.
I normally just add,
print*, (fortran)
std::cout << (cpp)
and get the output I need.
This is the code that I can't get to print to the terminal in linux, but prints fine in windows. The normal output file is fine under both platforms.
I would normally just run,
./appName -i inputFile -o outputFile
./appName -i inputFile -o outputFile > stdout.txt (for large output)
and could look at the debugging output in the shell. The program runs, the output is fine, but there is nothing in the shell, or output fie (I tested both).
I have also tried,
./appName -i inputFile -o outputFile &> stdout.txt
in case the output was somehow going to stderr.
The only thing I can think of is that cout is not going to the terminal in this case, but has been redirected elsewhere, like it might be if you were running a gui. I will look carefully through the code and see if I can spot anything that might be a likely candidate. It was also suggested that the problem may be with flushing the o/p buffer, so I will also try adding some cin statements and see if that changes anything.
LMHmedchem