I created a program using the "Command Line Tool" in Xcode4, with C++
When I run it by xcode, it works perfectly and generates the txt file in:
/Users/<user>/Library/Developer/Xcode/DerivedData/<projectname>-crivblennrpgzoarxmkowljdzvmv/Build/Products/Debug
But if I try to run the program directly from the folder, the file is not generated txt
Why?
I created the release version too, but does not run properly (does not generate the txt file)
and in the Release folder is created one file <nameproject>.dSYM
what is unix executable file?
Code:
#include <iostream>
#include <fstream>
int main (int argc, const char * argv[])
{
//Creates an instance of ofstream, and opens example.txt
std::ofstream a_file ( "example.txt" );
// Outputs to example.txt through a_file
a_file<<"This text will now be inside of example.txt";
// Close the file stream explicitly
a_file.close();
return 0;
}
When I run it by xcode, it works perfectly and generates the txt file in:
/Users/<user>/Library/Developer/Xcode/DerivedData/<projectname>-crivblennrpgzoarxmkowljdzvmv/Build/Products/Debug
But if I try to run the program directly from the folder, the file is not generated txt
Why?
I created the release version too, but does not run properly (does not generate the txt file)
and in the Release folder is created one file <nameproject>.dSYM
what is unix executable file?
Last edited: