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: <42F31909.4010403@familiehaase.de> Date: Fri, 05 Aug 2005 09:45:13 +0200 From: "Gerrit P. Haase" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.11) Gecko/20050728 MIME-Version: 1.0 To: Warren Young CC: Cygwin-L Subject: Re: Trouble making .so (undefined symbols) References: <42F02793 DOT 8080109 AT etr-usa DOT com> <42F07A02 DOT 4040308 AT familiehaase DOT de> <42F20ACF DOT 8050309 AT etr-usa DOT com> In-Reply-To: <42F20ACF.8050309@etr-usa.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Warren Young wrote: > 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? Libtool chokes when there is no shared library to link against. This cannot be changed without patching libtool. > 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. My latest diff files are from January, *should * still work. > 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. You need a Cygwin libmysqlclient DLL. > 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? Yes. >> 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. Ok. I really think it should default to a separate directory though. >> 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? No you're right, only change besides regenerating configure and Makefile.in was in Makefile.am where I added --no-undefined to LDFLAGS. > Thanks for your help so far, Gerrit. You're welcome, 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/