macbundle

What is the `pwd` of a Mac bundled app?

I'm running a GLFW app (that I wrote in C++) I run it as follows: ./prog.app/Contents/MacOS/prog # from the command line However, my code can't read relative-pathed files properly. So I believe what's happening is that this Mac Bundle is changing my current directory. 1) what does it change it to? 2) can I control this? Thanks! ...

Force macbundle setup

Background: I am writing a GLFW app on MacOSX. When I call glfwCreateWindow, the MacBundle stuff is called. Right now, in my program execution, I ahve the following: // getcwd() = /Users/me/code glfwCreateWindow(...); // some MacBundle stuff happens // getcwd() = /Users/me/code/prog.app/Contents/Resources I would like to control this...