FRA: Problème d'installation de libsdl-image1.2 pour utilisation avec kdevelop
Salokine Terata
salokine.terata at free.fr
Fri Aug 29 21:35:18 BST 2008
Hi,
I try to translate my mail.
How to use Kdevelop to detect a new installed lib and espacially SDL_image lib ?
I'm a beginner so maybe my question is a newbie question. In this case, excuse me for that.
At the begin, I think `sdl-config --libs` must return "-L/usr/lib -lSDL -lSDL_image". But in fact, it return only "-L/usr/lib -lSDL" and it's normal
mechanism.
Currently developping under Kdevelop, when I compile my source code (C language), I have the error:
"undefined reference to `IMG_Load'"
In soure code I have found in "configure.in" the line:
LIBSDL_LIBS="`$LIBSDL_CONFIG --libs`"
I have replaced with:
LIBSDL_LIBS="-L/usr/lib -lSDL -lSDL_image"
Where LIBSDL_LIBS is define in:
KDE_FIND_PATH(sdl-config, LIBSDL_CONFIG,
[${prefix}/bin${exec_prefix}/bin /usr/local/bin /opt/local/bin],
[AC_MSG_WARN([Could not find libsdl anywhere, check http://www.sdl.org])])
After replace this line, compilation work fine.
My question:
How to configure Kdevelop to recognize all SDL libraries (SDL + extensions) without to modify internal files?
In Kdevelop log, I see:
configure.in:12: warning: underquoted definition of KDE_FIND_PATH
configure.in:12: run info '(automake)Extending aclocal'
configure.in:12: or see
http://sources.redhat.com/automake/automake.html#Extending-aclocal
Is it about my question ?
is it a bug in KDE_FIND_PATH fonction ?
Additional informations:
Linux salokine-laptop 2.6.26-1-686 #1 SMP Fri Aug 8 18:51:38 UTC 2008 i686
GNU/Linux
ii libsdl-gfx1.2-4 2.0.13-4 drawing and graphical effects extension for
ii libsdl-image1.2 1.2.6-3 image loading library for Simple DirectMedia
ii libsdl-image1.2-dev 1.2.6-3 development files for SDL 1.2 image loading
ii libsdl-mixer1.2 1.2.8-4 mixer library for Simple DirectMedia Layer 1
ii libsdl-net1.2 1.2.7-2 network library for Simple DirectMedia Layer
ii libsdl-ttf2.0-0 2.0.9-1 ttf library for Simple DirectMedia Layer wit
ii libsdl1.2-dev 1.2.13-2 Simple DirectMedia Layer development files
ii libsdl1.2debian 1.2.13-2 Simple DirectMedia Layer
ii libsdl1.2debian-alsa 1.2.13-2 Simple DirectMedia Layer (with X11 and ALSA
ii kdevelop 4:3.5.2-1 An IDE for Unix/X11
ii kdevelop-data 4:3.5.2-1 An IDE for Unix/X11 - data
ii kdevelop-doc 4:3.5.2-1 An IDE for Unix/X11 - documentation
Extract of configure.in:
> dnl KDE_FIND_PATH(programm-name, variable-name, list of directories,
> dnl if-not-found, test-parameter)
> AC_DEFUN(KDE_FIND_PATH,
> [
> AC_MSG_CHECKING([for $1])
> if test -n "$$2"; then
> kde_cv_path="$$2";
> else
> kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
>
> AC_CACHE_VAL(kde_cv_path_$kde_cache,
> [
> kde_cv_path="NONE"
> dirs="$3"
> kde_save_IFS=$IFS
> IFS=':'
> for dir in $PATH; do
> dirs="$dirs $dir"
> done
> IFS=$kde_save_IFS
>
> for dir in $dirs; do
> if test -x "$dir/$1"; then
> if test -n "$5"
> then
> evalstr="$dir/$1 $5 2>&1 "
> if eval $evalstr; then
> kde_cv_path="$dir/$1"
> break
> fi
> else
> kde_cv_path="$dir/$1"
> break
> fi
> fi
> done
>
> eval "kde_cv_path_$kde_cache=$kde_cv_path"
>
> ])
>
> eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
>
> fi
>
> if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
> AC_MSG_RESULT(not found)
> $4
> else
> AC_MSG_RESULT($kde_cv_path)
> $2=$kde_cv_path
>
> fi
> ])
I can provide more informations if needed
Best regards
Salokine.
More information about the KDevelop
mailing list