Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
So I have been having some troubles installing libvorbis and SDL_mixer (both in order to get the Wesnoth game working) - and it seems as if include files in /usr/local/include are not being found by my compiler. When compiling SDL_mixer, it tells me that a certain variables is undeclared, and I have found this variable to be declared in a libvorbis header file which is installed by libvorbis into /usr/local/include. Is it possible that my compiler is not looking for include files in /usr/local/include? And how can I change this?
Is it safe to simply copy all the include files in /usr/local/include into /usr/include? I have tried stuff like this before, and sometimes it can be very damaging.
I've never built Wesnoth, but it probably uses pkg-config to find dependencies. The metadata file for libvorbis will tell Wesnoth where to look for headers. This is the metadata file for libvorbis on my machine.
Thanks for the quick reply - I appreciate it. But I am not using pkg-config. I am not sure how or if I could do this - as my Linux system has no direct access to the internet. Instead, I am trying to install wesnoth using the source package off its website. But the problem I am actually having, I think, is installing libSDL_mixer and libvorbisfile.
So I think the issue is with where gcc make is looking for include files (?).
Changing the gcc version probably won't solve the include issue. The compiler looks in certain places for header filer files, e.g. /usr/include and IIRC does not look in /usr/local/include by default. You can do:
export CFLAGS="-I /usr/local/include"
to tell gcc it needs to look in /usr/local/include for headers. However, I've occasionally found CFLAGS to be overwritten by the configure script so there may be another way to pass the include directory to configure (check ./configure --help and see if there is such an option). You are also probably going to need to add /usr/local/lib to your library path assuming there are libraries in that idrectory that need to be linked against. Usually you can append this to your LD_LIBRARY_PATH.
Hi, sorry, I was wrong. I just recompiled a few dependencies, and it started working. I did copy a few include files from /usr/local/include to /usr/include, so this might have been the issue. I will try your advice, in case this was the issue.