Menu

stdio on Mac OS

Using GLFW
2014-09-07
2014-09-08
  • Jim Van Verth

    Jim Van Verth - 2014-09-07

    Just started using GLFW last week and in general I like it, but I've run into an issue that I'm stuck on. My apps were originally written with GLUT, and used C stdio calls (fopen, fread) to read in textures. But once I switched to GLFW, the stdio calls can't seem to find the current directory. After I call glfwInit(), fopen() calls with "r" fail even if the file is there, and calls with "w" claim they succeed, but the file never shows up on disk. If I make those calls before glfwInit(), everything works fine. I'm building on Mac OS 10.8 with a static library. Is there anything I can do about this?

     
  • elmindreda

    elmindreda - 2014-09-08

    glfwInit changes the current directory of bundled applications. There is an option for this.

     
  • Jim Van Verth

    Jim Van Verth - 2014-09-08

    I don't know how I missed that before. Thank you!