Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <42F02793.8080109@etr-usa.com> Date: Tue, 02 Aug 2005 20:10:27 -0600 From: Warren Young User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) MIME-Version: 1.0 To: Cygwin-L Subject: Trouble making .so (undefined symbols) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 "!\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/