(1) Executed Result
- A executable file will create png file which contains "Hello, world"
(2) Source code [hello.c]
(3) How to compile code
1) check if the system has pkg-config
* you don't specify path of Cairo libraries and header files when you compile code using pkg-config
2) set PKG_CONFIG_PATH environment variable
a) for bash
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
b) for csh
setenv PKG_CONFIG_PATH /usr/local/lib/pkgconfig
* How to check shell type : enter "echo $SHELL"
3) compile hello.c
a) for bash
cc -o hello $(pkg-config --cflags --libs cairo) hello.c
b) for csh
cc -o hello `pkg-config --cflags --libs cairo` hello.c
* After compile code, you can see created exe file (hello)
(4) Reference
'컴퓨터 > 기타' 카테고리의 다른 글
How to build EFL (0) | 2011.03.15 |
---|---|
알고리즘]WERTYU (0) | 2011.02.08 |
OpenSource]Hwo to build Cairo (0) | 2010.08.09 |
단축키 모음 (0) | 2010.06.08 |
Makefile 의문 (0) | 2010.03.23 |