Problems with executing my program outside of xCode

Hey there people

I have a program that runs great in xcode but I am having issues when trying to run it as a standalone project and executing it from command line.

The, lets call it “”, file is in the correct directory within my JUCE project: name/Builds/MacOSX/build/Debug/

My program involves constantly creating and reading from text files within these generated folders, so the directory its running from is crucial.

  • When running from xcode, my cwd is correct and all generated folders appear in this Debug folder, but when I try to run it thru command line(or double clicking in finder), it says my cwd is root ‘/’ and even if I try to set my directory during the initialization of the main window class it still doesn’t seem to go anywhere.
  • Every other aspect of this program works perfectly normal when running it from command line, only the file paths are incorrect

Another note: in xcode, under the Products folder the “” appears in red text.

So is this an issue with my program, how i’m executing it, or most likely something completely different?

Any tips would help!
Thanks :smile_cat:

Okay. Looks like if i go into the folder, then Contents->MacOS

this is where the executable is and it seems to work fine doing it this way.