Scons.py compiling error with SDL

  • hadron
    12th Oct 2013 Member 0 Permalink

    Hey all.

    Could I have a bit of help with a error im getting when Im trying to compile TPT.

    Anyway here is the error:

     

     

    build\src\PowderToySDL.o:PowderToySDL.cpp:(.text+0x4f3): undefined reference to `SDL_LockSurface'

    build\src\PowderToySDL.o:PowderToySDL.cpp:(.text+0x559): undefined reference to `SDL_MapRGB'

     

    and ive shorten this but there is a whole lot more "undefined reference" s


    c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: build\src\PowderToySDL.o: bad reloc address 0x194 in section `.rdata'

     

     

    And here is a pastebin of the config.log: http://pastebin.com/YBXXQbNZ

    Edited 2 times by hadron. Last: 12th Oct 2013
  • jacob1
    13th Oct 2013 Developer 0 Permalink
    You did use the libraries linked to in the compiling guide, right? https://dl.dropboxusercontent.com/u/43784416/PowderToy/MingwLibraries.zip

    The SDL in there should work .... scons is obviously finding SDL according to the config.log, but it must be broken. I have no idea at all what "c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: build\src\PowderToySDL.o: bad reloc address 0x194 in section `.rdata'" means. googling something like it didn't bring up much. Maybe the --sdl-dir flag is needed. It isn't supposed to be with these libraries though, because it puts SDL in SDL.h, not SDL/SDL.h
    Edited once by jacob1. Last: 13th Oct 2013
  • hadron
    13th Oct 2013 Member 0 Permalink

    Yup downloaded them from that link. What I think is happening is that it finds the header but not the library from it.

    Edited once by hadron. Last: 13th Oct 2013