Jump to content

  • Log In with Google      Sign In   
  • Create Account

Using GLEW in XCode


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 bpops   Members   -  Reputation: 134

Like
0Likes
Like

Posted 06 August 2014 - 07:56 PM

Hello,

 

I recently decided to start learning opengl, and after reading a bit online, settled on some tutorials that utilize GLFW and GLEW. I'm a mac user and really wanted to be able to work in xcode.

 

I first set up GLFW, compiling from source, figuring out where the header and library files went, then attached those as required by xcode. I added the libglfw3.a to the "link to library" option and set /usr/local/include as a header search path. I also had to include several apple frameworks that were necessary: Cocoa, IOKit, video, and OpenLG. I ran GLFW's sample code to make sure things are working and they do! So no problem there.

 

GLEW, however, is a different story. I followed essentially the same steps, adding the header and library paths and including the library in the links. But I always get the fatal compile error: "ld: library not found for -lGLEW"

 

I have searched all over the net to try and figure out what is wrong. I have seen solutions to similar problems that include added -lGLEW to the other linker flags section, setting xcode to compile for i386, and setting xcode to compile for the current OS instead of a specific version. I have even tried including the dynamic library (which throws its own error). I have tried all combinations/permutations of these supposed solutions and still always get this same darn error.

 

Does anyone familiar with xcode have any idea where things may be breaking for me? I don't understand how it can't find a library that I'm literally pointing it to. In fact, other than the library, I don't understand where the compilation part of xcode would even *get* the word lGLEW, other than the library itself. So if it knows that word, how does it not know that the library is right there? Or is this some deeper issue that I'm not appreciating?

 

Many thanks in advance for any tips or help..



Sponsor:

#2 Promit   Moderators   -  Reputation: 7163

Like
0Likes
Like

Posted 06 August 2014 - 07:57 PM

This is one of those cases where simply adding the GLEW files to your project is much, much easier than linking it up from an external library.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS