ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to build a game called "Crack Attack!". My GL library, however, isn't in the standard location. So I configure with --prefix=/'location to my stuff'
Then I run make and it barfs. It doesn't know where to look for include files. Turns out that the makefile generated in the src directory doesn't inherit includedir from the parent directory, so I modify src/Makefile.in to:
Code:
INCLUDES = -DNDEBUG -DDATA_DIRECTORY='"${pkgdatadir}/"' -I$(includedir)
The Blue stuff is what I added.
It definitely changes the output, but the problem is now this:
Code:
In file included from <include dir>/GL/glut.h:17,
from Attack.cxx:26:
<include dir>/GL/freeglut_std.h:114:19: error: GL/gl.h: No such file or directory
So the problem is that glut.h doesn't know to look for gl.h in its own directory.
I'm trying to build a game called "Crack Attack!". My GL library, however, isn't in the standard location. So I configure with --prefix=/'location to my stuff'
Then I run make and it barfs.
The "--prefix" option is used to tell the install target where to put the files during installation. The default is "/usr/local". If you want to put them in "/opt" or even "/usr", you use the "--prefix" option.
Quote:
Originally Posted by Aegon
It doesn't know where to look for include files. Turns out that the makefile generated in the src directory doesn't inherit includedir from the parent directory, so I modify src/Makefile.in to:
Code:
INCLUDES = -DNDEBUG -DDATA_DIRECTORY='"${pkgdatadir}/"' -I$(includedir)
The Blue stuff is what I added.
It definitely changes the output, but the problem is now this:
Code:
In file included from <include dir>/GL/glut.h:17,
from Attack.cxx:26:
<include dir>/GL/freeglut_std.h:114:19: error: GL/gl.h: No such file or directory
So the problem is that glut.h doesn't know to look for gl.h in its own directory.
Any pointers?
Undo all your changes. If I were you, I would just delete the directory and untar the tarball again. Then do the following
# COPTS=-I/path-to-GL-headers ./configure
That will tell the configure script to add the path to your GL headers to its include file search path. That should fix your problem.
Thanks for the reply, David1357. I tried your suggestion, unfortunately it had no effect.
The additional variable makes no effect on either Makefile or src/Makefile following the configure step. So it does not affect the make process and it produces output as if I never entered the variable at all.
Perhaps the make system employed by the fine people at Crack Attack! isn't aware of the usual variables, and overwrites or ignores them.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.