Trouble making .so (undefined symbols)

Warren Young warren@etr-usa.com
Wed Aug 3 02:10:00 GMT 2005


I maintain MySQL++ (http://tangentsoft.net/mysql++/), a C++ API for 
MySQL.  It builds fine under Cygwin when we create a static library, but 
linking fails due to undefined symbols when we ask for a shared object.

The symptom is the libtool error "libtool: link: warning: undefined 
symbols not allowed in i686-pc-cygwin shared libraries" when creating 
the shared object itself.  I found some messages in the archive saying 
that this can be fixed by using the link flag -no-undefined, but that 
didn't help.

Now, libtool just warns here, doesn't return an error code.  No .so file 
is created in the .libs directory.  Also, a mere 8-byte .a file is 
created.  (It contains "!<arch>\n")

After this point in the MySQL++ build process, several example programs 
are built.  When linking the first one, we get a spate of errors.  I 
think this is secondary damage, because it tries to link to that .a 
file, but it's basically empty.  Naturally g++ can't find any of the 
symbol definitions it needs to link the program.

If you need to play with this to understand what I mean, download the 
v2.0 beta 2 source from the URL above...it's LGPL.

How do I convince libtool to create the bloody .so file?

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