Trouble making .so (undefined symbols)

Warren Young warren@etr-usa.com
Thu Aug 4 12:32:00 GMT 2005


Gerrit P. Haase wrote:
> 
> add the flag -no-undefined to libmysqlpp_la_LDFLAGS?

Ah.  I added it to a different automake LD* variable previously.  Now 
I'm getting a cygmysqlpp-2.dll, which I wasn't before.  This is 
progress, though incomplete....

> And you also need to use a shared libmysqlclient library.

Really?  Why?

This is a fair inconvenience because Cygwin builds of MySQL aren't easy 
to come by, probably because the official Win32 build of MySQL works so 
well.

I would rather continue with my present scheme, which is using an import 
library for the native build's DLL.  This is, in effect, a "shared 
libmysqlclient library", but I have a feeling that you mean a 
Cygwin-built .so file instead.

Now that I have the MySQL++ DLL building, I have a new problem, which is 
that the examples segfault as soon as they try to use anything from the 
DLL.  Is this due to using an import library to link to a VC++-built DLL 
instead of a Cygwin-built .so file?

> Older versions of libtool as included with the tarball don't work.

I'll add that to the MySQL++ FAQ.

FWIW, I always use the installed autotools (not the ones in the 
tarball), as I always use the autotools in "maintainer mode".

>  /usr/bin/install -c -m 644 'coldata.h' '/usr/include/coldata.h'
>  /usr/bin/install -c -m 644 'compare.h' '/usr/include/compare.h'
>  /usr/bin/install -c -m 644 'connection.h' '/usr/include/connection.h'
> [...]
>  /usr/bin/install -c -m 644 'vallist.h' '/usr/include/vallist.h'
> 
> You should put the headers into a separate directory, e.g.
> /usr/include/mysql++.

The README.unix file recommends that people use the --includedir 
configure flag to effect this.

> Send you a patchfile with PM.

I got it...it seems to just be all the autotools-generated stuff.  Did I 
miss a subtlety, skipping over all that?

Thanks for your help so far, Gerrit.

--
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/



More information about the Cygwin mailing list