Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Sun, 28 Jul 2002 11:34:08 +0200
From: "Gerrit P. Haase" <gp@familiehaase.de>
Organization: Esse keine toten Tiere
X-Priority: 3 (Normal)
Message-ID: <4546552348.20020728113408@familiehaase.de>
To: "Terry Flannery" <terry.flannery@btinternet.com>
CC: cygwin@cygwin.com
Subject: Re: MySQL server under cygwin
In-Reply-To: <02f601c235d8$b549dcc0$3400a8c0@sknet01>
References: <00b201c2352f$71e9d4c0$3400a8c0@sknet01>
 <190247813356.20020727104230@familiehaase.de>
 <137257096795.20020727131713@familiehaase.de>
 <027901c23571$443c6320$3400a8c0@sknet01>
 <48273246037.20020727174623@familiehaase.de>
 <02f601c235d8$b549dcc0$3400a8c0@sknet01>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hallo Terry,

Am Sonntag, 28. Juli 2002 um 03:47 schriebst du:

> Yes it is. I would at least like to ba able to have cygwin enabled mysql
> client applications... is this possible?

Yes, libmysqlclient works fine when compiled under Cygwin.
Once you have a static libmysqlclient.a it is possible to
create a shared .dll from it.

With the clientlib you can link most applications to enable
the access to a MySQL server.

Just add '--without-server' to the configure options.

After you have a static lib you can create a shared lib
like this (steamroller tactics):

gcc -shared -o cygmysqlclient-3.23.51.dll \
 -Wl,--out-implib=libmysqlclient.dll.a -Wl,--export-all-symbols \
 -Wl,--enable-auto-import -Wl,--whole-archive libmysqlclient.a \
 -Wl,--no-whole-archive -lcrypt -lz

You also need to modify the file /usr/lib/mysql/libmysqlclient.la
to point to the dll then:
# The name that we can dlopen(3).
dlname='/bin/cygmysqlclient-3.23.51.dll'

# Names of this library.
library_names='libmysqlclient.dll.a'

# The name of the static archive.
old_library='libmysqlclient.a'


Gerrit
-- 
=^..^=


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

