2010年1月25日 星期一

[程式設計] 如何安裝與編譯 Clutter

clip_image002

Based on the description of Wikipedia, Clutter is an open source graphics library for creating hardware-accelerated user interfaces. It relies upon OpenGL based technologies. Now Clutter is supported by Intel.

I think if you are a non-windows developer, you should take a look on this graphics library. Based on Clutter, you can create fast, visually rich, portable and animated graphical user interfaces.

Softwares

VirtualBox: 3.1.2 r56127   (optional)

Ubuntu: 9.04

Clutter: 1.0.0

 

Install

Step 1: Install essential package
sudo apt-get install build-essential libgl1-mesa-dev libxfixes-dev libxdamage-dev libxcomposite-dev libclutter-cairo-0.8-dev libjson-glib-dev libgdk-pixbuf-dev

Step 2: Build Clutter
$ ./configure;./make

$sudo make install

How to build your first program

Step 1:  Compile an example

$ gcc `pkg-config --cflags --libs clutter-1.0` test-text.c

clip_image004

Step 2: Run the example

$ LD_LIBRARY_PATH=/usr/local/lib/ ./test

clip_image002[4]

clip_image002[6]

 

Enjoy.

by Jing.