Hi all,
Ruby 1.8.1
Windows 2000
I installed libexpat in C:\Program Files\Expat and then tried to
install Quixml. I made one modification to the extconf.rb file, using
'have_library("libexpat")' instead of 'have_header('expat.h')...'.
Then I ran this:
C:\ruby\src\QUIXML~1.1>ruby extconf.rb
--with-quixml-include='c:\program files\e
xpat\source\lib' --with-quixml-lib='c:\program files\expat\libs'
But it fails. Here's the mkmf.log output:
have_library: checking for main() in libexpat.lib...
-------------------- no
"cl -nologo -Feconftest -IC:/ruby/lib/ruby/1.8/i386-mswin32
-IC:/ruby/lib/ruby/1.8/i386-mswin32 -Ic:\program
files\expat\source\lib -I. -I./.. -I./../missing -MD -Zi -O2b2xg- -G6
conftest.c msvcrt-ruby18-static.lib libexpat.lib oldnames.lib
user32.lib advapi32.lib wsock32.lib -link -libpath:"C:/ruby/lib"
-libpath:"c:\program files\expat\libs" -stack:0x2000000"
Command line warning D4024 : unrecognized source file type
'files\expat\source\lib', object file assumed
conftest.c
LINK : fatal error LNK1181: cannot open input file
"files\expat\libs.obj"
checked program was:
/* begin */
/*top*/
int main() { return 0; }
int t() { main(); return 0; }
/* end */
"cl -nologo -Feconftest -IC:/ruby/lib/ruby/1.8/i386-mswin32
-IC:/ruby/lib/ruby/1.8/i386-mswin32 -Ic:\program
files\expat\source\lib -I. -I./.. -I./../missing -MD -Zi -O2b2xg- -G6
conftest.c msvcrt-ruby18-static.lib libexpat.lib oldnames.lib
user32.lib advapi32.lib wsock32.lib -link -libpath:"C:/ruby/lib"
-libpath:"c:\program files\expat\libs" -stack:0x2000000"
Command line warning D4024 : unrecognized source file type
'files\expat\source\lib', object file assumed
conftest.c
LINK : fatal error LNK1181: cannot open input file
"files\expat\libs.obj"
checked program was:
/* begin */
#include <winsock2.h>
#include <windows.h>
/*top*/
int main() { return 0; }
int t() { void ((*volatile p)()); p = (void ((*)()))main; return 0; }
/* end */
···
--------------------
However, everything works fine if I install expat in c:\expat. So, it
looks like the space in the directory name is causing a problem. Is
this a problem with mkmf.rb or is it a bug in the Windows linker?
Regards,
Dan