# Problems building mysql library on 1.7.3 on win32

**URL:** <https://rubytalk.org/t/problems-building-mysql-library-on-1-7-3-on-win32/1484>\
**Category:** ruby-talk\
**Created:** [30 August 2002 04:04 UTC](https://rubytalk.org/t/problems-building-mysql-library-on-1-7-3-on-win32/1484 "2002-08-30T04:04:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rich\_Kilmer](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@Rich\_Kilmer](https://rubytalk.org/u/Rich_Kilmer)\
**Post date:** [30 August 2002 04:04 UTC](https://rubytalk.org/t/problems-building-mysql-library-on-1-7-3-on-win32/1484/1 "2002-08-30T04:04:26Z")

</div>

Setup:

ms c/c++: v 13.00.9466 (vs studio .net)  
mysql: v 3.23.49-nt  
ruby mysql: mysql-ruby-2.4.2a

when I run: ruby extconf.rb --with-mysql-dir=/MySQL

I get:

checking for mysql\_query() in -lmysqlclient… no  
checking for main() in -lm… yes  
checking for mysql\_query() in -lmysqlclient… no  
checking for main() in -lz… no  
checking for mysql\_query() in -lmysqlclient… no  
checking for main() in -lsocket… no  
checking for mysql\_query() in -lmysqlclient… no  
checking for main() in -lnsl… no  
checking for mysql\_query() in -lmysqlclient… no

contents of c:\MySQL\lib:

02/22/2002 04:03 AM 233,472 libmySQL.dll  
02/22/2002 04:03 AM 19,764 libmySQL.lib  
02/22/2002 04:01 AM 500,872 mysqlclient.lib  
02/22/2002 04:00 AM 82,704 zlib.lib

extconf.rb code:

require 'mkmf’  
inc, lib = dir\_config(‘mysql’, ‘/usr/local’)  
libs = [‘m’,‘z’,‘socket’,‘nsl’]  
while not find\_library(‘mysqlclient’, ‘mysql\_query’, lib,  
"#{lib}/mysql") do  
exit 1 if libs.empty?  
have\_library(libs.shift)  
end  
have\_header(‘mysql.h’) or have\_header(‘mysql/mysql.h’) or exit 1  
create\_makefile(“mysql”)
