Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: SDL 1.3 compile problem

  1. #1
    Join Date
    Jan 2008
    Location
    Australia
    Beans
    84
    Distro
    Ubuntu Gnome 16.04 Xenial Xerus

    Question SDL 1.3 compile problem

    I have set SDL 1.3 up on my computer in the folder sdl within my home folder and having problems compiling testGl.c which I copied over to my home folder. gcc is having problems finding the correct folder and I am after the correct gcc arguments to get this compiled. Not sure if I need to put the GL and SDL after the folder locations or what?

  2. #2
    Join Date
    Sep 2005
    Beans
    1,596
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: SDL 1.3 compile problem

    To point it to includes you do:

    gcc -I/path/to/includes

    To point it to libraries you do:

    gcc -L/path/to/libraries

    Try that, it uses what you specify in -I or -L first before continuing with the other "search paths"
    MBA M1 - M1 8GB 256GB - macOS Monterey
    MSI GL65 - i5-10300H 16GB 512GB GTX 1650 Windows 11
    Galaxy Book Go - Snapdragon 7c Gen 2 4GB 128GB Windows 11

  3. #3
    Join Date
    Jan 2008
    Location
    Australia
    Beans
    84
    Distro
    Ubuntu Gnome 16.04 Xenial Xerus

    Question Re: SDL 1.3 compile problem

    With gcc testgl.c -o testgl -I/home/joe/sdl/include -L/home/joe/sdl/lib -L/home/joe/sdl/include/sdl/GL

    I get it to compile but when I try to run it I get
    "No OpenGL support on this system"

    However I thought sdl 1.3 came with it plus I have OpenGl installed and have compiled programs with SDL 1.2 and OpenGL.

  4. #4
    Join Date
    Nov 2005
    Location
    Almeria, Spain
    Beans
    276
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: SDL 1.3 compile problem

    The SDL libraries normally build also an utility, sdl-config, that provides the necessary flags for compilation. Sample usage:

    $ gcc `sdl-config --libs --cflags` -o something something.cpp

    Now, I don't know what's the path where it's built by default.
    Francisco Camenforte Torres
    http://fmct.blogspot.com

  5. #5
    Join Date
    Jan 2008
    Location
    Australia
    Beans
    84
    Distro
    Ubuntu Gnome 16.04 Xenial Xerus

    Exclamation Re: SDL 1.3 compile problem

    I think the problem is in the paths it is looking at. I have extracted and installed it into a sdl folder inside my home folder. that is /home/joe/sdl . The folder for OpenGl files I presume is the one it is having problems with. For SDL 1.2 which is in the default area no problems I would put (if file was test.c)
    "gcc test.c -o test -lSDL -lGL"

    and it would compile. Yet having problems when I have SDL 1.3 as well in another folder not the default one.

  6. #6
    Join Date
    Oct 2007
    Beans
    1,914
    Distro
    Lubuntu 12.10 Quantal Quetzal

    Re: SDL 1.3 compile problem

    @OP: Could you copy&paste the output when running the configure-script of the SDL library before you compile it?

  7. #7
    Join Date
    Nov 2005
    Location
    Almeria, Spain
    Beans
    276
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: SDL 1.3 compile problem

    Using sdl-config is worth a try. Really.
    Francisco Camenforte Torres
    http://fmct.blogspot.com

  8. #8
    Join Date
    Jan 2008
    Location
    Australia
    Beans
    84
    Distro
    Ubuntu Gnome 16.04 Xenial Xerus

    Re: SDL 1.3 compile problem

    fct I have tryed the sdl-config with the same result. I it is just not recognising the openGL directory. The sdl seems OK I was able to run a program that shows the version and it came back as 1.3 The problem seems to be the openGL directory. Do I need to set the library directory for that? And how?

    Zugzwang not understanding what you mean. Do you want a copy of the sdl-config file?

  9. #9
    Join Date
    Oct 2007
    Beans
    1,914
    Distro
    Lubuntu 12.10 Quantal Quetzal

    Re: SDL 1.3 compile problem

    Quote Originally Posted by dosh View Post
    Zugzwang not understanding what you mean. Do you want a copy of the sdl-config file?
    You said that you have set up SDL 1.3 on your computer. Since version 1.3 is not part of Ubuntu, this means that you have extracted the SDL .tar.gz file of the libsdl into some directory and ran "./configure" to build it (because that's a required part of the installation process unless you install it as a Ubuntu package). When doing so, the "./configure" script generates a lot of messages. Please copy&paste them here.

  10. #10
    Join Date
    Jan 2008
    Location
    Australia
    Beans
    84
    Distro
    Ubuntu Gnome 16.04 Xenial Xerus

    Re: SDL 1.3 compile problem

    Zugzwang does it create a file or you talking about the messeages received in the terminal when I ran ./config , if they don't make a file they are gone and I would need to rebuild to get them.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •