From: Daniel Berger Date: 2007-04-07T03:15:04+09:00 Subject: Re: mkmf have_header function on Windows XP On Apr 6, 11:37 am, Blake Miller wrote: > I'm trying to get an extension built on WinXP. It's the PL/Ruby library > for writing stored procedures for PostgreSQL. > > I'm posting this because it seems like a generic enough question. > > I've got Ruby 1.8.6. PostgreSQL 8.2 > > I'm running command: > > ruby extconf.rb --with-pgsql-dir="C:\PostgreSQL\8.2\" > --with-pgsql-dir="C:\PostgreSQL\8.2\lib" --ruby="C:\ruby" > > And it's complaining that it can't find a header file that I know exists > where it's looking. The error is: > > checking for C:\PostgreSQL\8.2\include\server/catalog/pg_proc.h... no > > I've tried all sorts of paths, and have begun digging into extconf.rb, > but no matter what the path, the have_header() function always causes > the above error. You've got two "--with-pgsql-dir" directives there. I'm guessing you wanted something else for the second one. This worked for me (sort of): C:\rubyVC8\src\plruby-0.5.0>c:\rubyvc8\bin\ruby extconf.rb --with- pgsql-dir=C:\Progra~1\PostgreSQL\8.1 checking for catalog/pg_proc.h... yes checking for rb_hash_delete() in ruby.h... yes checking for rb_block_call()... no checking for server/utils/array.h... yes The system cannot find the path specified. The filename or extension is too long. The filename or extension is too long. The filename or extension is too long. The filename or extension is too long. creating Makefile However, even if you get past that point, the generated Makefile is not compatible with Windows' nmake. I get this: C:\rubyVC8\src\plruby-0.5.0>nmake Microsoft (R) Program Maintenance Utility Version 8.00.50727.42 Copyright (C) Microsoft Corporation. All rights reserved. makefile(40) : fatal error U1001: syntax error : illegal character '{' in macro Stop. I've mentioned this to Guy a long time ago, but he hasn't fixed it yet. Sorry to be a killjoy. Bug Guy about it. :) Regards, Dan