Programming joysticks

Thanks for the reply. Here is the problem I am having I am trying to
compile a very simple program and I get the following error:

g++ SDLTest.cc -o test sdl-config --libs

don’t you want :
g++ SDLTest.cc -o test sdl-config --libs --cflags

then it will find your includes

/Line72On Tuesday 04 February 2003 8:21 pm, Daryl Lonnon wrote:

or
g++ SDLTest.cc -o test -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL
-pthread

You’re missing your include path.

I’m not sure if there is an “official” way of doing it, but you need
to add “-I/usr/local/include -I/usr/local/include/SDL” onto the compile
line.

The -I appends to the search path for looking for include files. So
adding the above two arguments will cause the compiler to also look
in /usr/local/include and /usr/local/include/SDL (in that order).

I’m assuming that /usr/local/include is where you installed the SDL
include files (which is the default location on linux boxes IIRC).

Daryl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

sdl-config --cflags

Unfortunately, that’s not quite right for freebsd. The scripts name is
"sdl11-config" (yes, for sdl 1.2)

… iirc :slight_smile: (I vagually recall this being an arguing point somewhere)
I always make a symlink

ln -s /usr/local/bin/sdl11-config /usr/local/bin/sdl-config

On Tue, Feb 04, 2003 at 06:30:28PM -0800, Steven Brown wrote:


-Erik <@Erik_Greenwald> [http://math.smsu.edu/~erik]

The opinions expressed by me are not necessarily opinions. In all probability,
they are random rambling, and to be ignored. Failure to ignore may result in
severe boredom or confusion. Shake well before opening. Keep Refrigerated.