Showing posts with label GTK. Show all posts
Showing posts with label GTK. Show all posts

Saturday, July 26, 2008

Indoor Localization - Position System


This is the program I wrote for visualize indoor localization system.

I use GTK+2.x to implement GUI and the detail description is at the webpage of the program.

If there are any questions or suggestions, please feel free to email to me. Thanks

Program webpage: LINK

Wednesday, June 18, 2008

GdkFont usage

To use GdkFont, you must specify the font name
And it must specify by a XLFD describing

The simplest way is set "-*-*-medium-r-normal--N-*-*-*-p-*-*-1"
N = the font size

Wednesday, May 14, 2008

Gtkmm under Windows using Microsoft Visual Stuido 2005

Gtkmm基本上算是GTK的延伸,差異在於他將GTK修改成C++的語法
在Visual Stuido 2005的安裝方法gtkmm_windows
首先要先下載Gtk+Gtkmm development package
若是使用vista的使用者,Visual Stuido 2005須先安裝sp1

照著網頁上的說明即可,不過我編譯的時候出現下列錯誤
LNK1104 : cannot open file 'cairo.lib'
不知道為什麼,明明我都沒有連結到cairo.lib.
最後我把安裝C:\GTK\lib\cairomm-1.0d.lib複製一份名稱改成cairo.lib
這樣就可以正常編譯執行,非常的神奇....

Friday, June 08, 2007

GTK2+ 在win32下執行

之前在Linux下使用GTK2+來寫GUI介面,因看到網路上說GTK2+在windows下也能編譯執行,所以就突發奇想試試看能不能把程式移植到windows上。

首先下載GTK2.4 for win32

安裝至電腦裡時,他會出現是否要把library跟include檔案加入到電腦裡已知的編譯環境下。測試過Dec C++ 跟 VC++ ,不過編譯環境要先安裝才會有作用(建議讓GTK2.4幫你加入,因為檔案不少)。

接下來就是編譯GTK的程式,除了上面說的要把library跟include檔案加入到電腦裡已知的編譯環境,還需設定連結(linker)參數,這時候就要在project setting的link裡面,加入如下:
glib-2.0.lib gtk-win32-2.0.lib gdk-win32-2.0.lib gobject-2.0.lib gdk_pixbuf-2.0.lib gthread-2.0.lib gmodule-2.0.lib pango-1.0.lib intl.lib
這樣就能成功使用GTK的library了!

不過使用Dev C++雖然能編譯成功,但執行的時候會有問題。不過VC++就不會 Orz...
下面是在windows下的GTK圖形介面