[Win32utils-devel] Fix for win32-shortcut

Berger, Daniel Daniel.Berger at qwest.com
Thu Feb 3 11:29:16 EST 2005


Hi all,

I've narrowed down one more problem for cygwin/mingw.  For
win32-shortcut, it appears that you need to add "-luuid" to $LIBS.  Once
Takaaki tried that, it worked.

How does this look for the extconf.rb for win32-shortcut?

# extconf.rb
require "mkmf"
require "ftools"

if RUBY_PLATFORM =~ /cygwin|mingw/i
   CONFIG["CC"] = "g++"
   CONFIG["LDSHARED"] = "g++ -shared"
   $LIBS += ' -lole32 -luuid'
else
   # -Tp tells cl to compile as c++
   CONFIG["COMPILE_C"].sub!(/-Tc/,'-Tp')
   $LIBS += ' ole32.lib '
end

File.copy("lib/win32/shortcut.c",".")
File.copy("lib/win32/shortcut.h",".")

create_makefile("win32/shortcut")

Unless there are any objections, I will commit the change this weekend.

Dan




More information about the win32utils-devel mailing list