From: Kentaro KAWAMOTO Date: 2007-07-26T23:57:25+09:00 Subject: [ruby-dev:31304] rb_thread_statusが未定義? 川本と申します。 ruby.h を include したソースを g++ でコンパイルすると、エラーになります。 enum rb_thread_status を定義している node.h を読んでいないようですが、 どのように修正すべきかわかりませんでした。 ご確認頂ければと思います。 --- kawamoto@walnut:~/tmp$ cat test.c #include #include #include int main(int argc, char* argv[]) { printf("Hello World"); exit(EXIT_SUCCESS); } kawamoto@walnut:~/tmp$ g++ -Wall -I/usr/local/lib/ruby/1.8/x86_64-linux test.c /usr/local/lib/ruby/1.8/x86_64-linux/intern.h:207: error: use of enum ‘rb_thread_status’ without previous declaration /usr/local/lib/ruby/1.8/x86_64-linux/intern.h:207: error: invalid type in declaration before ‘;’ token kawamoto@walnut:~/tmp$ g++ -v Using built-in specs.Target: x86_64-linux-gnu コンフィグオプション: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release x86_64-linux-gnu スレッドモデル: posix gcc バージョン 4.1.2 (Ubuntu 4.1.2-0ubuntu4) --- -- Kentaro KAWAMOTO