From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31118 invoked by alias); 1 Dec 2007 12:22:33 -0000 Received: (qmail 31110 invoked by uid 22791); 1 Dec 2007 12:22:33 -0000 X-Spam-Check-By: sourceware.org Received: from mu-out-0910.google.com (HELO mu-out-0910.google.com) (209.85.134.187) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 01 Dec 2007 12:22:29 +0000 Received: by mu-out-0910.google.com with SMTP id g7so1000998muf for ; Sat, 01 Dec 2007 04:22:22 -0800 (PST) Received: by 10.86.77.5 with SMTP id z5mr8348811fga.1196511742032; Sat, 01 Dec 2007 04:22:22 -0800 (PST) Received: by 10.86.95.4 with HTTP; Sat, 1 Dec 2007 04:22:21 -0800 (PST) Message-ID: <8bc817ee0712010422g139eefcfxea13bdec38b79b42@mail.gmail.com> Date: Sat, 01 Dec 2007 12:22:00 -0000 From: "Tom Browder" To: "Michael Sullivan" Subject: Re: Undefined References Cc: gcc-help@gcc.gnu.org In-Reply-To: <1196508719.25393.8.camel@camille.espersunited.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8bc817ee0711302043t7eefb94eub6423ca23a449175@mail.gmail.com> <1196508719.25393.8.camel@camille.espersunited.com> X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2007-12/txt/msg00012.txt.bz2 On Dec 1, 2007 5:31 AM, Michael Sullivan wrote: > On Fri, 2007-11-30 at 22:43 -0600, Tom Browder wrote: > > On Nov 30, 2007 10:28 PM, Michael Sullivan wrote: > > > > > > On Fri, 2007-11-30 at 22:01 -0600, Tom Browder wrote: > > > > On Nov 30, 2007 7:26 PM, Michael Sullivan wrote: > > > > > I'm having trouble building my project. This is my first project I've > > > > > worked on that uses make, so I'm having a lot of problems with it. > > > > > Here's my Makefile: ... > > > In file included from battle.cpp:4: > > > /usr/local/include/SDL/SDL_gfxPrimitives.h:17:17: error: SDL.h: No such > > > file or directory > > > > You may need the -I (hyphen uppercase i) option to tell gcc where to > > find SDL.h. For instance: Look carefully at the gcc manual and the options to g++, the '-I' option, which may be used multiple times, gives a path to search for include files. Now, I can't help the warning at the moment, but the show stoppers are the undefined references which are probably defined in the missing libraries you asked for on the line: LIBS=`sdl-config --cflags --libs` -lSDL_image -lSDL_gfx -lSDL_ttf You probably need to add one or more '-L' options which you use to tell gcc where to find libraries (for details, see the gcc manual). -Tom Tom Browder Niceville, Florida USA