Gtkプログラミング on Windows!!! (478レス)
Gtkプログラミング on Windows!!! http://mevius.5ch.net/test/read.cgi/tech/1147024203/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
レス栞
222: デフォルトの名無しさん [] 2009/05/14(木) 20:55:58 >221 CentOSだけど、DISPLAYなくても動くみたい --- ..... g_type_init(); pGError = NULL; pGdkPixbuf = NULL; pGdkPixbuf = gdk_pixbuf_new_from_file(pFile, &pGError); if (NULL == pGdkPixbuf) { fprintf(stderr, "%s:%d:%s\n", pFile, pGError->code, pGError->message); g_error_free(pGError); } else { printf("Open success %s\n", pFile); } ..... --- $ g++ -g 'gdk_pixbuf_new_from_file.c' `pkg-config gtk+-2.0 --libs --cflags` $ export DISPLAY= $ ./a.out tmp.jpg gdk_pixbuf_new_from_file(tmp.jpg) Open success tmp.jpg $ ./a.out tmp.txt gdk_pixbuf_new_from_file(tmp.txt) tmp.txt:3:Couldn't recognize the image file format for file 'tmp.txt' http://mevius.5ch.net/test/read.cgi/tech/1147024203/222
223: デフォルトの名無しさん [sage] 2009/05/15(金) 11:03:31 >222 返信ありがとうございます! なるほど、g_type_initを呼ばないといけなかったのですね。 勉強不足でした。 今回初めてlinux上で開発をやらなければならなくてやってるのですけど 難しいですね・・・。英語しかないものが多くて泣きそうです。 本当に助かりました。222さん。 http://mevius.5ch.net/test/read.cgi/tech/1147024203/223
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.020s