From: Nobuyoshi Nakada Date: 2011-06-06T19:03:09+09:00 Subject: [ruby-dev:43637] Re: [Ruby 1.9 - Bug #4835] Compilation failure of ext/tk with recent ActiveTcl なかだです。 At Mon, 6 Jun 2011 18:35:11 +0900, Hidetoshi NAGAI wrote in [ruby-dev:43636]: > I don't have Visual C++. > Does it properly recognize '-D"uintptr_t=unsigned int"'? $CPPFLAGSではなく$defsを使ってみてください。 diff --git i/ext/tk/extconf.rb w/ext/tk/extconf.rb index ed150ef..255e09c 100644 --- i/ext/tk/extconf.rb +++ w/ext/tk/extconf.rb @@ -372,3 +372,3 @@ def collect_tcltk_defs(tcl_defs_str, tk_defs_str) - defs.map{|ary| s = ary.join(''); (s.strip.empty?)? "": "-D" << s}.join(' ') + defs.map{|ary| s = ary.join(''); (s.strip.empty?)? "": "-D" << s} end @@ -1944,3 +1944,3 @@ $CPPFLAGS ||= "" # $CPPFLAGS += " #{TkConfig_Info['TK_DEFS']}" -$CPPFLAGS += collect_tcltk_defs(TclConfig_Info['TCL_DEFS'], TkConfig_Info['TK_DEFS']) +$defs += collect_tcltk_defs(TclConfig_Info['TCL_DEFS'], TkConfig_Info['TK_DEFS']) @@ -2020,5 +2020,4 @@ if (TkLib_Config["tcltk-framework"] || # create - $CPPFLAGS ||= "" - $CPPFLAGS << %[ -DRUBY_VERSION=\\"#{RUBY_VERSION}\\"] - $CPPFLAGS << %[ -DRUBY_RELEASE_DATE=\\"#{RUBY_RELEASE_DATE}\\"] + $defs << %[-DRUBY_VERSION=\\"#{RUBY_VERSION}\\"] + $defs << %[-DRUBY_RELEASE_DATE=\\"#{RUBY_RELEASE_DATE}\\"] -- --- 僕の前にBugはない。 --- 僕の後ろにBugはできる。 中田 伸悦