Re: debugging problem
Ron Eggler wrote:
Hi,
I'm developing software for Linux on my desktop. The software gets compiled
and the binary is downloaded to the target system where i can't install a
debugging system or something.
I've written following code:
#ifdef INIT_REPORT
std::ofstream out("/usr/share/NovaxTSP/INITreport.txt", std::ios_base::in |
std::ios_base::out | std::ios_base::app);
if(!out) { // if out couldn't be opened, print error and exit
std::cout << "Cannot open reportfile:
\"/usr/share/NovaxTSP/INITreport.txt\"." << std::endl;
exit(0);
}
std::string str = newLine + "\n";
out << newLine.c_str() << std::endl;
out.close();
#endif
The problem is, it works just fine on my desktop but it returns
with "/usr/share/NovaxTSP/INITreport.txt" on the target system. I'm root
and i do have write access to /usr/share/NovaxTSP/. I have
tried "touch /usr/share/NovaxTSP/INITreport.txt" but this didn't help
either.
df -h shows that I'm not running out of space either
Does any one have any other idea what could go wrong?
You may also get better answers in gnu.g++.help, or one of the many
linux programming newsgroups.