2009-09-01から1ヶ月間の記事一覧

autotools で生成した実行ファイルはただのスクリプトファイルだから

gdb とかするには libtool とかでほげってしないと, % gdb ./hoge ... hoge: not in executable format: File format not recognizedってエラーでてだめ. % libtool --mode=execute gdb ./hogeとかやる.

Glib/Timers のラッパー

てことで,書いた.(ちょうてきとう これで少し楽になった.はっは. #include <iostream> #include <glib.h> #include <unistd.h> using namespace std; class GTimerP { private: GTimer *Timer; gulong microseconds; gdouble time; public: GTimerP() { Timer = g_timer_new(); } ~G</unistd.h></glib.h></iostream>…

undefined reference to `g_timer_continue' / glib の timers 使い方

glibの timers を使おうとして,g_timer_continue を呼ぶと,「うまく言語化できない」などと言って,コンパイルできなかった. というか, g_timer_new/start/stop などは使えるのに,なぜ g_timer_continue が使えない... と思ったのだけど,結論からい…

glib インストール / コンパイル

インストール@Ubuntu % sudo aptitude install libglib2.0-dev パスの通った場所に glib.h ははいらない バージョンを明示的に指定するためなのかな? -I とか -l とかつけないと,エラーいろいろでる. hoge.cpp:10:18: error: glib.h: No such file or di…

man ひきたい

微妙にman引けない場合.@Ubuntu % man 3 printf No manual entry for printf in section 3 See 'man 7 undocumented' for help when manual pages are not available.インストール. % aptitude search manpages ... p manpages-ja - 日本語版マニュアルペ…