Jump to content

  • Log In with Google      Sign In   
  • Create Account

Xcode Can't find freeglut


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
2 replies to this topic

#1 Kk1496   Members   -  Reputation: 186

Like
0Likes
Like

Posted 23 July 2014 - 08:06 PM

I installed free glut and flew using MacPort. Then, i followed the instructions on Lazy foo for setting up the linker and lib and includes. 

 

When i use

 

#include <OpenGL/freeglut.h>

 

It can't find the file.

Is there a different set of instructions for setting up Xcode when I use MacPort?



Sponsor:

#2 Kk1496   Members   -  Reputation: 186

Like
-1Likes
Like

Posted 24 July 2014 - 01:59 AM

nvm got an answer on OpenGL forum :)



#3 aregee   Members   -  Reputation: 1022

Like
1Likes
Like

Posted 24 July 2014 - 09:29 AM

Nice to post the answer here for future reference too, but I am guessing it is about telling Xcode which folder to search for include files and library files, which often is located in '/usr/local/include' and '/usr/local/lib', after you have compiled the library or something.

 

The settings in Xcode are called "User Header Search Paths" and for some reason I have set "Framework Search Paths" for library files. Not sure why I did that, and not used "Library Search Paths", but it works in my project.

 

EDIT:

 

Just came up with two more pitfalls: if you specify a path too deep, you may have to specify the include like this:

 

#include "freeglut.h"

 

instead of:

 

#include "OpenGL/freeglut.h"

 

Also, if you don't check the "recursive" option, subfolders won't be scanned, so you won't find the include files anyway if they are one level deeper.  (May not always apply, if you specify right folder, and it is flat.)


Edited by aregee, 25 July 2014 - 08:25 PM.





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