[Win32utils-devel] win32-api (1.0.5) on Ruby 1.8.6 Mingw

Gordon Thiesfeld gthiesfeld at gmail.com
Thu Apr 17 19:45:11 EDT 2008

When trying to compile the win32-api gem on ruby 1.8.6 (2008-03-03
patchlevel 114) [i386-mingw32], I get the following error:

gcc -shared -s -o api.so api.o -L"." -L"C:/ruby/ruby_mingw/lib" -L.
-lmsvcrt-ruby18  -lws2_32
api.o: In function `api_init':
undefined reference to `_tcscmp'
collect2: ld returned 1 exit status
make: *** [api.so] Error 1

Here's the relevant code from api.c (lines 200 - 204)

  /* The order of 'A' and 'W' is reversed if $KCODE is set to 'UTF8'. */
  if(!_tcscmp(rb_get_kcode(), "UTF8")){
     first  = "W";
     second = "A";

Any ideas?



More information about the win32utils-devel mailing list