Results 1 to 6 of 6
  1. #1


    Member Since
    Mar 18, 2013
    Posts
    3
    Problem including X11 in XCode.
    I am using XCode and a library called CImg which uses X11. When I run this program:
    include "CImg.h"
    using namespace cimg_library;
    int main() {
    CImg image("snail.bmp");
    }

    I get these errors:

    Undefined symbols: "_XUnlockDisplay", referenced from:
    "_XGetVisualInfo", referenced from: cimg_library::CImgDisplay::_assign(unsigned int, unsigned int, char const*, unsigned int, bool, bool)in main.o
    "_XStoreColors", referenced from: cimg_library::CImgDisplay::_set_colormap(unsigned long&, unsigned int)in main.o
    etc.

    I think XCode doesn't know where my X11 is, and to be honest I'm not sure I've installed it correctly. I think it is supposed to be in opt/X11 but I don't see it.
    Any idea of how to fix this?

  2. #2

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,782
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    I'm not sure what version of OS X you're using but if you're using Snow Leopard or newer, head over to the XQuartz project and install X11 from there.
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

  3. #3


    Member Since
    Mar 18, 2013
    Posts
    3
    Quote Originally Posted by vansmith View Post
    I'm not sure what version of OS X you're using but if you're using Snow Leopard or newer, head over to the XQuartz project and install X11 from there.
    I am using 10.5.8 and have installed XQuartz. I am still getting the same error though. I think it has to do with changing my command line tools in XCode. How do I do this?

  4. #4


    Member Since
    Mar 18, 2013
    Posts
    3
    I forgot to mention I am using XCode 3.1.4, if that matters.

  5. #5

    cradom's Avatar
    Member Since
    Feb 14, 2004
    Location
    Groves, Texas
    Posts
    4,501
    Specs:
    21in. iMac 10.11 --- HP win 10
    What you need to do is install the X11 SDK, or Software Development Kit. Don't ask me where to get it, haven't messed with that in a LONG time.
    Delusions are often functional. A motherís opinions about her childrenís beauty, intelligence, goodness, et cetera ad nauseam, keep her from drowning them at birth.
    -Lazarus Long

  6. #6

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,782
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    Quote Originally Posted by cradom View Post
    What you need to do is install the X11 SDK, or Software Development Kit. Don't ask me where to get it, haven't messed with that in a LONG time.
    I imagine that a copy is available on Apple's developer download page.
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Another GIMP/X11 problem
    By skinnypigs in forum OS X - Operating System
    Replies: 2
    Last Post: 12-27-2012, 04:30 PM
  2. X11 problem
    By jezzamon in forum OS X - Operating System
    Replies: 1
    Last Post: 09-18-2011, 04:50 AM
  3. xcode x11
    By stone in forum OS X - Development and Darwin
    Replies: 0
    Last Post: 05-27-2009, 10:51 AM
  4. Problem installing X11
    By Silverfroth in forum Images, Graphic Design, and Digital Photography
    Replies: 3
    Last Post: 02-11-2007, 03:29 AM
  5. x11 problem
    By johna in forum OS X - Operating System
    Replies: 6
    Last Post: 11-25-2006, 01:51 PM

Posting Permissions

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