I have just dropped java swing and start using gtk+. I found pkg-config is not set autometically in Arch . pkg-config <enter> returns error message. pkg-config --libs or pkg-config --cflags returns unexpected results. After long tedious web search i found a right solution which works for me. Here is the syntax --
gcc -Wall -Wextra -std=c99 `pkg-config --cflags --libs gtk+-2.0` file.c -o appName <enter>
and my GTK+ code is compilled successfully.
Update ---
try to find dependencies --
pkg-config --libs --cflags gtk+-3.0
compile -- .c
gcc name.c `pkg-config --libs --cflags gtk+-3.0'
compile --- .c++
g++ name.cpp `pkg-config --libs --cflags gtk+-3.0'
Uff !!!!!!
gcc -Wall -Wextra -std=c99 `pkg-config --cflags --libs gtk+-2.0` file.c -o appName <enter>
and my GTK+ code is compilled successfully.
Update ---
try to find dependencies --
pkg-config --libs --cflags gtk+-3.0
compile -- .c
gcc name.c `pkg-config --libs --cflags gtk+-3.0'
compile --- .c++
g++ name.cpp `pkg-config --libs --cflags gtk+-3.0'
Uff !!!!!!

No comments:
Post a Comment