Brian Dessent wrote:
http://cygwin.com/ml/cygwin/2004-11/msg00159.html
Okay...that gets the DLL to build. For the archives, the pthread
changes are no longer required with current v4.1.x versions.
But the MySQL++ examples still hang when built against a Cygwin MySQL
client DLL.
New problem: example programs link, and run for a short while, then
This is with a native server? Or a Cygwin server?
With a native Linux server, on another box. :)
You might be interested to try it yourself. Apply the attached patch to
MySQL++. Then say "./bootstrap" to re-build all the autoconf stuff, and
then "make" them. The very first example you need to run,
examples/resetdb, exhibits the problem.
But don't bother if you're not personally interested. I've all but
given up myself, because of the whole Cygwin GPL issue. The main point
of getting shared libraries working is to be able to comply with the
LGPL (which MySQL++ is licensed under) in a commercial program. But
past posts on this list say there are very few commercial Cygwin
licensees. How many commercial licensees can there be that also want to
use MySQL++?
I think efforts are better spent elsewhere, unless there's an easy fix,
or someone is chasing this problem for reasons not specifically related
to MySQL++.
Thanks for your help in any case. You've answered my questions with
aplomb. Perhaps the answers will be useful to someone else, in a
slightly different situation.
Index: config/mysql_loc.m4
===================================================================
--- config/mysql_loc.m4 (revision 1007)
+++ config/mysql_loc.m4 (working copy)
@@ -32,15 +32,23 @@
[MYSQL_inc_check="$with_mysql_include
$with_mysql_include/include $with_mysql_include/include/mysql"])
#
- # Decide which C API library to use, based on thread support
+ # Decide which C API library to use
#
- if test "x$acx_pthread_ok" = xyes
- then
- MYSQL_C_LIB=mysqlclient_r
- else
- MYSQL_C_LIB=mysqlclient
- fi
+ case $host_os in
+ cygwin*)
+ MYSQL_C_LIB=mysqlclient.dll
+ ;;
+ *)
+ if test "x$acx_pthread_ok" = xyes
+ then
+ MYSQL_C_LIB=mysqlclient_r
+ else
+ MYSQL_C_LIB=mysqlclient
+ fi
+ ;;
+ esac
+
#
# Look for MySQL C API library
#
Index: lib/Makefile.am
===================================================================
--- lib/Makefile.am (revision 1007)
+++ lib/Makefile.am (working copy)
@@ -22,7 +22,7 @@
lib_LTLIBRARIES=libmysqlpp.la
-libmysqlpp_la_LDFLAGS=-version-info @MYSQLPP_LIBTOOL_VERSION@
+libmysqlpp_la_LDFLAGS=-version-info @MYSQLPP_LIBTOOL_VERSION@ -no-undefined
libmysqlpp_la_SOURCES = \
coldata.cpp connection.cpp datetime.cpp fields.cpp field_names.cpp \
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/