VectorLinux
July 24, 2014, 07:15:14 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: Compiling a game with SDL libraries  (Read 1926 times)
Villain
Member
*
Posts: 2


« on: September 20, 2011, 10:41:17 am »

I'm attempting to install a game that uses SDL.  I've installed the latest stable release of SDL (SDL-1.2.14) and SDL_gfx-2.0.22 from source.  During game compilation, I receive this error:

Code:
g++ -DHAVE_CONFIG_H -I. -I..   -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  -I/usr/include/libxml2   -I./guichan/include -DPKG_DATADIR=\""/usr/local/share/manaplus/"\" -DLOCALEDIR=\""/usr/local/share/locale"\" -Wall   -DUSE_INTERNALGUICHAN   -MT gui/widgets/manaplus-avatarlistbox.o -MD -MP -MF gui/widgets/.deps/manaplus-avatarlistbox.Tpo -c -o gui/widgets/manaplus-avatarlistbox.o `test -f 'gui/widgets/avatarlistbox.cpp' || echo './'`gui/widgets/avatarlistbox.cpp
In file included from ./localplayer.h:28:0,
                 from gui/widgets/avatarlistbox.cpp:28:
./client.h:33:27: fatal error: SDL_framerate.h: No such file or directory
compilation terminated.
make[2]: *** [gui/widgets/manaplus-avatarlistbox.o] Error 1
make[2]: Leaving directory `/home/adam/manaplus/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/adam/manaplus'
make: *** [all] Error 2

SDL_framerate.h is a part of the SDL_gfx library.  The game is searching /usr/include/SDL for the appropriate include files, however, the SDL libraries that I've installed from source have been installed in /usr/local/lib by their respective packages. 

I see two solutions to this but don't know how to do so.  I install the libraries in the directory the game is searching for the files or I have the game search a different directory for the SDL files instead of its default.  I think it would be easier to have the game search for /usr/local/lib where my SDL libraries are located during compilation and I've tried "make -I/usr/local/lib" but still receive the same error.  What should I do to fix this problem?

Logged
pierce.jason
Packager
Vectorite
****
Posts: 250



« Reply #1 on: September 20, 2011, 10:49:00 am »

Do you have a configure executable in the source directory? `./configure --includedir=/usr/local/lib` would probably do the trick.
Logged

pierce.jason
Email: $(echo -e "moc\x2eliamg\x40nosaj.ecreip" | rev)
hata_ph
Packager
Vectorian
****
Posts: 3256


-- Just being myself --


« Reply #2 on: September 20, 2011, 08:00:37 pm »

have u try run below in terminal?

Quote
locate SDL_framerate.h
Logged
Villain
Member
*
Posts: 2


« Reply #3 on: September 22, 2011, 08:01:56 am »

Thanks for the replies.

I made copies of the SDL library files from /usr/local/lib to /usr/include/SDL.  I know that isn't the best approach but it allowed me to compile. 

I was looking for the "correct" way to solve my problem so I will give your includedir suggestion a try pierce.jason.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!