Setting up X11 in XCode

Discussion in 'Mac Programming' started by guest42, Oct 23, 2007.

  1. guest42 macrumors newbie

    Joined:
    Jul 11, 2007
    #1
    I'm trying to figure out how to set up XCode so that I can start learning X11. I'm really only looking to set up a window in which I can draw lines/points, and I have sample code, but I'm terrible at setting things up, and I don't even know what framework I should use.

    Can someone give me some step by step instructions on how to get XCode ready for programming X11 stuff? Any help is appreciated.
     
  2. szymczyk macrumors regular

    Joined:
    Mar 5, 2006
    #2
    The first thing you have to do is install the X11 SDK. It's part of the Xcode installation. You have to do a custom install to install X11.

    After installing the X11 SDK, choose File > New Project to create a new project. Choose External Build System project. As the name suggests, this type of project uses an external build system to build your project instead of Xcode's build system. Xcode's build system does not build X11 apps.

    Now you can start writing your code. To build your project, you must create a makefile or use a build system like CMake, SCons, or autotools to build your project. The Xcode external build system project is initially configured to use make. If you decide to use something like CMake, SCons, or autotools instead of writing a makefile, you must tell Xcode to use that build system instead of make to build your project. Double-click the name of your target from the Groups and Files list to open the target settings window. Modify the Build Tool field.
     
  3. guest42 thread starter macrumors newbie

    Joined:
    Jul 11, 2007

Share This Page