GTK 컴파일 어떻게 하는건가요??
처음으로 글올려봅니다...
gcc -Wall -g hello.c -o hello `pkg-config --cflags gtk+-2.0` \
`pkg-config --libs gtk+-2.0`
이런식으로 컴파일 하니
밑에 글처럼 되더군요...왜 안되는건가요??
컴파일 조차 못하고있으니 답답할뿐입니다...-_-
http//bbs.kldp.org/viewtopic.php?t=58988&highlight=gtk+%C4%C4%C6%C4%C0%CF
이글보고 어떻게든 해볼라고 했지만 여전히 무리더군요...
왜 안되는걸까요??? 얼핏보기에는 gtk 경로지정이 안되는거같은데?
gtk 제가 현재 무슨 버젼을 사용하는지 알아볼려면 어떻게 해야하나요??
-----------------------------------------------------------------------
[chobo@localhost chobo]$ gcc -Wall -g hello.c -o hello `pkg-config --cflags gtk+-2.0` \ `pkg-config --libs gtk+-2.0`
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
gcc 그런 파일이나 디렉토리가 없음
hello.c121 gtk/gtk.h 그런 파일이나 디렉토리가 없음
hello.c In function `main'
hello.c5 `GtkWidget' undeclared (first use in this function)
hello.c5 (Each undeclared identifier is reported only once
hello.c5 for each function it appears in.)
hello.c5 `window' undeclared (first use in this function)
hello.c7 warning implicit declaration of function `gtk_init'
hello.c9 warning implicit declaration of function `gtk_window_new'
hello.c9 `GTK_WINDOW_TOPLEVEL' undeclared (first use in this function)
hello.c10 warning implicit declaration of function `gtk_widget_show'
hello.c12 warning implicit declaration of function `gtk_main'
pkg-config 의 결과를 가져오지 못하는 군요..일단 /usr/
pkg-config 의 결과를 가져오지 못하는 군요..
일단 /usr/share/pkgconifg/ 디렉토리에..
gtk+-2.0.pc 파일이 있나 확인해 보시고..
만약에 있으시다면..
export PKG_CONFIG_PATH=/usr/share/pkgconfig
후에 컴파일하시고..
없는 경우라면..
gtk 개발 툴들이 설치가 완벽히 안된 듯 하니..
뭔가 빠진 게 없나 살펴보는게 좋을 듯 합니다..
상황을 보아하니 gtk-config 역시 설치 안 되있을 수 도 있을 것 같지만..
혹시나 gtk-config가 설치되어 있다면
로 컴파일 하실 수 있을 겁니다.
Emerging the World!
댓글 달기