Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Sdl on suse with kdevelop

  1. Oct 10, 2005 #1
    Im new to developing on nix and im trying to make a cross platform game using sdl., i set up sdl using the dev rpm but im getting an error when trying to compile
    libtool: link: cannot find the library `/usr/local/lib/libstdc++.la'

    this file is in /usr/lib/ which i would assume the the defaullt directory?

    i have tried adding
    sdl_test_2_LDFLAGS = $(all_libraries) -l/usr/lib -l/usr/lib/GL
    (where sdl_test_2 is the apps name)
    to the makefile but it still cant find it. any help would be appriacted, if you need more details i will post.
    Last edited: Oct 10, 2005
  2. jcsd
  3. Oct 10, 2005 #2


    User Avatar
    Staff Emeritus

    Here is a guide:

    http://gpwiki.org/index.php/C:How_to_set_up_your_SDL_Build_Environment#Linux:_KDevelop [Broken]

    It might also be that your missing some dependences, but try following the guide first and then come back if it doesn't work out.
    Last edited by a moderator: May 2, 2017
  4. Oct 10, 2005 #3
    thanks for the link dduardo from what i read of this forum so far, it was you i was looking a reply from ':) cheers
    Last edited by a moderator: May 2, 2017
  5. Oct 10, 2005 #4
    hmm still no joy.
    i dont understand it(mind you theres plenty of visual studio errors i dont get), coz you can see the directory /usr/lib in included as a path?

    i have even tried #pragma comment (lib,"/usr/lib/libstdc++.la") to no avail

    linker output:
    cd '/home/dmail/projects/sdl_test_03/debug' && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" gmake -k
    gmake all-recursive
    gmake[1]: Entering directory `/home/dmail/projects/sdl_test_03/debug'
    Making all in src
    gmake[2]: Entering directory `/home/dmail/projects/sdl_test_03/debug/src'
    cd /home/dmail/projects/sdl_test_03 && /bin/sh /home/dmail/projects/sdl_test_03/missing --run automake-1.9 --gnu src/Makefile
    cd .. && /bin/sh ./config.status src/Makefile depfiles
    config.status: creating src/Makefile
    config.status: executing depfiles commands
    gmake[2]: Leaving directory `/home/dmail/projects/sdl_test_03/debug/src'
    gmake[2]: Entering directory `/home/dmail/projects/sdl_test_03/debug/src'
    /bin/sh ../libtool --tag=CXX --mode=link g++ -O0 -g3 -lSDL_mixer -o sdl_test_03 -R/usr/lib /usr/lib/ sdl_test_03.o -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread
    libtool: link: cannot find the library `/usr/local/lib/libstdc++.la'
    gmake[2]: *** [sdl_test_03] Error 1
    gmake[2]: Target `all' not remade because of errors.
    gmake[2]: Leaving directory `/home/dmail/projects/sdl_test_03/debug/src'
    gmake[2]: Entering directory `/home/dmail/projects/sdl_test_03/debug'
    gmake[2]: Leaving directory `/home/dmail/projects/sdl_test_03/debug'
    gmake[1]: *** [all-recursive] Error 1
    gmake[1]: Leaving directory `/home/dmail/projects/sdl_test_03/debug'
    gmake: *** [all] Error 2
    *** Exited with status: 2 ***
    Last edited: Oct 10, 2005
  6. Oct 10, 2005 #5


    User Avatar
    Gold Member

    This rpm package has libstdc++.la as one of the libs it installs.
  7. Oct 10, 2005 #6
    i have the lib, but its in the what i would have thought the default file /usr/lib/

    due to advice i have since
    edited d.so.conf and added /usr/lib before /usr/local/lib . then, run ldconfig as root (although i dont know if this did anything?)with no parameters.
    Last edited: Oct 10, 2005
  8. Oct 16, 2005 #7
    ok i couldnt find anybody who could give me a reason or a method of fixing this error so i reinstalled the whole os (drastic i know) and this get rid of that error :)
    but this means i now get another error :(
    i have no prob compiling a simple c++ app, but when i try and compile an sdl app this is the error:
    the full output is
    does anybody know how i can compile an sdl app without getting errors(regretably windows has no probs :( )
    Last edited by a moderator: May 2, 2017
  9. Oct 17, 2005 #8
    finally got sdl to work after installing slang-devel. ;)
  10. Oct 23, 2005 #9
    I am glad I stumbled on this thread. I had tried to compile some basic SDL programs using KDevelop for a couple of weeks without any luck. I had the same error "/usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../../i586-suse-linux/bin/ld: cannot find -lslang" and had given up on it because I could get it to work using the command line with g++ using the -lSDL flag. I just downloaded the slang-devel package and now it works with KDevelop. I had always thought that KDevelop was just a frontend for gcc/g++.
    Thank you very much for the information.
    Eric :smile:
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook