解析度不夠不能玩GTK

這幾天試著用Code::Blocks來編譯GTK的程式,發現使用這個GTK 2.24的all-in-one bundle會有一些問題,第一個問題就是找不到gdk-pixbuf-2.0的問題,這個問題Google的到答案,用

project.AddIncludeDir(GtkPathDefaultInc + wxFILE_SEP_PATH + _T(“gdk-pixbuf-2.0”));

這一行加入到C:Program FilesCodeBlocksshareCodeBlockstemplateswizardgtk這裡wizard.script中的125行,就可以解決了,這一行跟124行那邊的指令碼相似,看起來就知道是在搜尋gdk-pixbuf-2.0的路徑。

第二個問題就難解了,我得到這樣的訊息:

(20120223.exe:840): Gdk-WARNING **: gdk_win32_pixmap_new: depth = 16 not support
ed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_new_with_values: assertion `drawable
!= NULL’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_set_colormap: assertion `GDK_IS_GC (
gc)’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_new_with_values: assertion `drawable
!= NULL’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_set_colormap: assertion `GDK_IS_GC (
gc)’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_new_with_values: assertion `drawable
!= NULL’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_set_colormap: assertion `GDK_IS_GC (
gc)’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_new_with_values: assertion `drawable
!= NULL’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_set_colormap: assertion `GDK_IS_GC (
gc)’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_new_with_values: assertion `drawable
!= NULL’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_set_colormap: assertion `GDK_IS_GC (
gc)’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_new_with_values: assertion `drawable
!= NULL’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_set_colormap: assertion `GDK_IS_GC (
gc)’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_new_with_values: assertion `drawable
!= NULL’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_set_colormap: assertion `GDK_IS_GC (
gc)’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_new_with_values: assertion `drawable
!= NULL’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_set_colormap: assertion `GDK_IS_GC (
gc)’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_new_with_values: assertion `drawable
!= NULL’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_set_colormap: assertion `GDK_IS_GC (
gc)’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_new_with_values: assertion `drawable
!= NULL’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_set_colormap: assertion `GDK_IS_GC (
gc)’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_new_with_values: assertion `drawable
!= NULL’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_set_colormap: assertion `GDK_IS_GC (
gc)’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_new_with_values: assertion `drawable
!= NULL’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_set_colormap: assertion `GDK_IS_GC (
gc)’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_new_with_values: assertion `drawable
!= NULL’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_set_colormap: assertion `GDK_IS_GC (
gc)’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_new_with_values: assertion `drawable
!= NULL’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_set_colormap: assertion `GDK_IS_GC (
gc)’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_new_with_values: assertion `drawable
!= NULL’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_set_colormap: assertion `GDK_IS_GC (
gc)’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_new_with_values: assertion `drawable
!= NULL’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_gc_set_colormap: assertion `GDK_IS_GC (
gc)’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_draw_rectangle: assertion `GDK_IS_GC (g
c)’ failed

(20120223.exe:840): Pango-WARNING **: couldn’t load font “新細明體 Not-Rotated 9
“, falling back to “Sans Not-Rotated 9”, expect ugly output.

(20120223.exe:840): Gdk-WARNING **: gdk_win32_pixmap_new: depth = 16 not support
ed

(20120223.exe:840): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJE
CT (object)’ failed

(20120223.exe:840): Gdk-CRITICAL **: gdk_drawable_get_size: assertion `GDK_IS_DR
AWABLE (drawable)’ failed

可以正常編譯,但是執行就會有這樣複雜的錯誤訊息,後來還是Google到說我的顯示卡設定有問題,咦,有點印象了,因為之前電腦太慢,把解析度設成

2012-02-23_163311

色彩品質為中(16位元)了,Orz,改設回最高(32位元)吧。問題終於解決,但是另外有個問題,如果我只能玩16為元的顯示,那GTK可以玩嗎?

感謝你看到這裡,很快就可以離開了,但最好的獎勵行動就是按一下幫我分享或留言,感恩喔~

點我分享到Facebook

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *