Thread: Can't compile an SDL program under Linux

  1. #1
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057

    Can't compile an SDL program under Linux

    What do you need to link an SDL program to in Linux? I have a program that works under Windows, and I want to compile it under Linux. I get several hundred linker errors, one of which is
    Code:
    In function `SDL_XineramaQueryScreens':
    : undefined reference to `_XFlush'
    There are also function like `dlopen', `XmissingExtension', and `sem_init'.

    Which librar[y|ies] [is|are] th[is|ese] in?
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    Make sure you have the X development libraries installed.

  3. #3
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    I know, I was wondering where those were. I figured it out -- /usr/lib/libxmms.so.1.3.1 on my computer.

    Thanks.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compile problem on linux
    By cnb in forum C Programming
    Replies: 3
    Last Post: 09-29-2008, 04:14 AM
  2. Replies: 8
    Last Post: 03-10-2008, 12:08 PM
  3. Replies: 5
    Last Post: 11-27-2005, 09:50 PM
  4. compile program?
    By Goosie in forum C++ Programming
    Replies: 9
    Last Post: 06-22-2005, 02:26 PM