GLFW and Xcode

Post: #1
I'm trying to set up an xcode project to use with glfw and I'm having some problems...
The library itself compiled without a problem from the command line, as did all of the samples.
I created an empty project in xcode, added a carbon build target, then added the frameworks needed as well as the libglfw.a. I copied one of the samples over and everything still compiles fine... but the program won't run. After some error checking, it looks like glfwinit is failing. I'm a tad baffled here, as all the samples that were compiled when I built the library run just fine.
Is there something I'm missing in the xcode project set up?
Quote this message in a reply
Posts: 5,143
Joined: 2002.04
Post: #2
That sounds like it would work.

Looking at the source, there's an obvious reason why glfwInit() can fail on Mac OS X -- if there's no Resources folder inside the application bundle for it to change directory to. If you add any kind of file that Xcode doesn't treat as source (eg. .txt or .png) to your project, Xcode will automatically create the resources directory for you (and copy that file into it).

I'm 50/50 on whether a missing resources folder should be fatal to glfwInit() or not -- if you're relying on it happening, you definitely want to know if it fails... but on the other hand, for a simple test, you don't necessarily want to go to all the trouble of building an application bundle with a Resources folder.
Quote this message in a reply
Post: #3
I have the same problem.

Tonight, I will try to understand this story of "bundle".

Quote this message in a reply
Post: #4
It works fine when adding a Resources directory
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  need Xcode, GLFW and devIL help Adamal 5 5,796 Dec 31, 2005 12:59 AM
Last Post: Adamal
  GLFW problems. Runowin 2 3,773 Dec 30, 2005 07:11 PM
Last Post: Runowin