Specifying Path for sdl.h

  • Mdkar
    18th Oct 2015 Member 0 Permalink

    On mac, I have been having an error while trying to compile tpt saying SDL wasn't found or installed. I definately have SDL installed. I deleted some parts of the SConscript file just to see what happens.  When I did scons in the terminal, it ran everything and ended near here:

     

    src/PowderToySDL.cpp:9:10: fatal error: 'SDL.h' file not found

    #include "SDL.h"

             ^

    1 error generated.

    scons: *** [build/src/PowderToySDL.o] Error 1

    scons: building terminated because of errors.

     

    After some research, I figured that the path for the computer to find sdl.h must be wrong, and I should tell it to find it somewhere else.

     

    My question is: Where do I find the file in which the location of the sdl.h file is supposed to be, so I can change it?

  • jenn4
    18th Oct 2015 Member 0 Permalink
    @temporaryaccount (View Post)
    You probably don't have libsdl installed. The normal SDL package and the development libraries package are usually different. What distro are you using?
  • jacob1
    18th Oct 2015 Developer 0 Permalink
    @temporaryaccount (View Post)
    Are you using OS X? If so the detection is slightly broken and I don't know how to fix it.

    Either way, you should probably undo your changes to the SConscript, and then install the SDL development headers/library. You probably removed the part of the SConscript that checked in two different places for SDL and picked whichever one actually had it.

    Edit: If you are using OS X and it can't find SDL after installing it, try installing SDL using the method described here instead: https://powdertoy.co.uk/Wiki/index.html?title=Compiling_for_OS_X&oldid=4454
    Edited 2 times by jacob1. Last: 18th Oct 2015
  • jBot-42
    19th Oct 2015 Banned 0 Permalink
    This post is hidden because the user is banned
  • jacob1
    19th Oct 2015 Developer 0 Permalink
    @jBot-42 (View Post)
    I guess download & install xQuartz then (also linked to in the guide): http://xquartz.macosforge.org/downloads/SL/XQuartz-2.7.2.dmg

    The guide doesn't say how to do it for some reason.
  • jBot-42
    19th Oct 2015 Banned 0 Permalink
    This post is hidden because the user is banned
  • jacob1
    19th Oct 2015 Developer 0 Permalink
    @jBot-42 (View Post)
    This suggests that you run "ln -s /opt/X11/include/X11 /usr/local/include/X11". If you have X11 installed in /opt/X11 then that should probably work.
  • jBot-42
    19th Oct 2015 Banned 0 Permalink
    This post is hidden because the user is banned
  • Mdkar
    19th Oct 2015 Member 0 Permalink

    What I got after doing ./coonfigure && make and then sudo make install:

    http://pastebin.com/zdNnPn6U

    I don't think it installed properly.

     

    I am using OS X 10.11 (El Capitan)

  • jBot-42
    19th Oct 2015 Banned 0 Permalink
    This post is hidden because the user is banned