[libxml-devel] Release and Windows Gem
Charlie Savage
cfis at savagexi.com
Sat Feb 9 17:03:09 EST 2008
> So this works for you to compile on Windows? I guess I'm a confused
> b/c you are using Config::CONFIG here. Isn't that what extconf.rb
> uses? But you said that's was why extconf.rb didn't work.
Sorry, that might have been a bit confusing. I only pick out a few
parts from it:
["archdir", "/lib/ruby/1.8/i386-mswin32"],
["bindir", "/bin"],
["libdir", "/lib"],
["LIBRUBY_SO", "msvcrt-ruby18.dll"],
But look at the rest, which are taken from my 1.8.4 version of Ruby
installed with the one-click installer. The values are for building
with VC++. Notice that for gcc:
* The compiler (CPP) is wrong
* The CFLAGS are wrong
* The linker command is wrong
* The linker flags (DLDFLAGS)
Thus you can't use extconf.rb. And this is the big downfall of
extconf.rb - it assumes that you use the same compiler to build
extensions as you use to build Ruby itself. On Windows at least that is
not necessarily so...
Charlie
["CC", "cl -nologo"]
["CFLAGS", "-MD -Zi -O2b2xg- -G6"],
["COMMON_HEADERS", "windows.h winsock.h"],
["COMMON_LIBS", "m"],
["COMPILE_C", "cl -nologo -MD -Zi -O2b2xg- -G6 -c -Tc$(<:\\=/)"],
["COMPILE_CXX", "$(CXX) -c -Tp$(<:\\=/)"],
["CPP", "cl"],
["CPPFLAGS", ""],
["CPPOUTFILE", "-P"],
["DLDFLAGS",
"-link -incremental:no -debug -opt:ref -opt:icf -dll $(LIBPATH)
-def:$(DEFFILE) -implib:$(*F:.so=)-i386-mswin32.lib
-pdb:$(*F:.so=)-i386-mswin32.pdb"],
["LDSHARED", "cl -nologo -LD"],
["LIBOBJS", " acosh.obj crypt.obj erf.obj win32.obj"],
["LIBPATHFLAG", " -libpath:\"%s\""],
["LINK_SO",
"cl -nologo -LD -Fe$(@) $(OBJS) oldnames.lib user32.lib advapi32.lib
wsock32.lib $(LOCAL_LIBS) -link -incremental:no -debug -opt:ref
-opt:icf -dll $(LIBPATH) -def:$(DEFFILE)
-implib:$(*F:.so=)-i386-mswin32.lib -pdb:$(*F:.so=)-i386-mswin32.pdb"],
["TRY_LINK",
"cl -nologo -Feconftest $(INCFLAGS) -I$(hdrdir) -MD -Zi -O2b2xg- -G6
$(src) $(LOCAL_LIBS) oldnames.lib user32.lib advapi32.lib wsock32.lib
-link $(LIBPATH) -stack:0x2000000"],
["XCFLAGS",
"-DRUBY_EXPORT -I. -IC:/develop/win/ruby/stable
-IC:/develop/win/ruby/stable/missing"],
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
Url : http://rubyforge.org/pipermail/libxml-devel/attachments/20080209/f814b16a/attachment-0001.bin
More information about the libxml-devel
mailing list