From: nobu.nokada@... Date: 2001-12-08T15:02:43+09:00 Subject: [ruby-talk:27900] Re: Building XMLParser with MS VC++ At Sat, 8 Dec 2001 13:59:01 +0900, Rich Kilmer wrote: > The extconf.rb included with XMLParser seems very linux > oriented. Has anyone built this under Win32 with MSVC (v6)? Do you mean setting -L option to $LDFLAGS directly? # Or rather, VC is too curious, I want to say. And, -I and -D flags should be added to $CPPFLAGS not but $CFLAGS. --- extconf.rb~ Sun Oct 15 15:22:39 2000 +++ extconf.rb Sat Dec 8 14:45:58 2001 @@ -23,10 +23,10 @@ end ## ' -DXML_ENC_PATH=getenv\(\"XML_ENC_PATH\"\)' + ## " -DNEW_EXPAT" -$CFLAGS = "-I#{cwd}/expat/xmlparse -I#{cwd}/expat/xmltok" -$LDFLAGS = "-L#{cwd}/expat/xmlparse" +$CPPFLAGS = "-I#{cwd}/expat/xmlparse -I#{cwd}/expat/xmltok" +$LIBPATH << "#{cwd}/expat/xmlparse" dir_config("xmltok") dir_config("xmlparse") if xml_enc_path - $CFLAGS += " -DXML_ENC_PATH=\\\"#{xml_enc_path}\\\"" + $CPPFLAGS += " -DXML_ENC_PATH=\\\"#{xml_enc_path}\\\"" end @@ -35,11 +35,11 @@ if have_header("xmlparse.h") || have_hea have_library("xmltok", "XML_ParserCreate") if have_func("XML_SetNotStandaloneHandler") - $CFLAGS += " -DNEW_EXPAT" + $CPPFLAGS += " -DNEW_EXPAT" end if have_func("XML_SetParamEntityParsing") - $CFLAGS += " -DXML_DTD" + $CPPFLAGS += " -DXML_DTD" end if have_func("XML_SetExternalParsedEntityDeclHandler") - $CFLAGS += " -DEXPAT_1_2" + $CPPFLAGS += " -DEXPAT_1_2" end have_func("XML_SetDoctypeDeclHandler") Nobu Nakada