I was able to get in touch with the coder who wrote this part of the app, and he thinks that possible cout and cerr are re-directed to dev/null somewhere. This was written at least 10 years ago, so his recollections are a bit hazy. Apparently the child process runs more or less like a Daemon and things like standard streams are poorly defined.
He suggested adding a verbosity flag, and if that doesn't work, creating an fstream for debugging with a hard path, instead of using cout. Something like,
std::ofstream mycout("/tmp/mydebugfile");
None of this explains why it works in windows cygwin, except that the src for the child main function is rather different in windows as compared to linux. I tried a diff to see if I could spot the relevant difference between the src files, but they are a bit too different and the diff is pretty messy.
What should I look for in the src that would be an indication that cout is going to dev/null, or somewhere other than the terminal?
I will run the code you posted above and post back in a bit.
LMHmedchem
---------- Post updated at 01:16 PM ---------- Previous update was at 12:32 PM ----------
I put the code you posted in three places in the code, in case things changed at some point. I put it at the beginning of the parent code, and also in the child main, before and after the fortran function is called.
In all cases, it just outputs numbers, the location outputs 0, 1, and 2. The next location outputs, 0, 1, 2, 3 and 4, and the last location, 0, 1, 2, 3, 4 and 5.