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 Date: Tue, 27 May 2003 16:13:13 -0400 From: Jason Tishler Subject: Re: Cygwin GCC linking Python extensions issue In-reply-to: To: David Abrahams Cc: cygwin AT cygwin DOT com Mail-followup-to: David Abrahams , cygwin AT cygwin DOT com Message-id: <20030527201312.GA2408@tishler.net> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline User-Agent: Mutt/1.4i References: <20030527131009 DOT GA1624 AT tishler DOT net> Dave, On Tue, May 27, 2003 at 10:45:22AM -0400, David Abrahams wrote: > Jason Tishler writes: > >> boost_python.dll\gcc\debug-python\runtime-link-dynamic\boost_python.lib" "c:\build\libs\ > >> python\build\bin\boost_python.dll\gcc\debug-python\runtime-link-dynamic\boost_python.lib" > >> -lpython2.3.dll > > ^^^^^^^^^^^^^ > > > > Does the above imply direct linking against the DLL (i.e., > > python2.3.dll) instead of the import library (i.e., > > python2.3.dll.a)? > > No, when you write -lxxx, you link against libxxx.a, so I'm linking > against the import library: libpython2.3.dll.a IIRC, the above is not necessary true for Cygwin -- -lfoo can resolve to more things than under Unix. Anyway, please use -Wl,--verbose to determine what "-lpython2.3.dll" is resolving to. I would try "-lpython2.3" too. > >> d000000.o(.idata$2+0x0): multiple definition of `__head_boost_python_dll' > >> c:\build\libs\python\build\bin\boost_python.dll\gcc\debug-python\runtime-link-dynamic\ > >> boost_python.lib(d000000.o)(.idata$2+0x0): first defined here > >> d000001.o(.idata$5+0x0): multiple definition of `__imp___ZN5boost6python5scope13current_scopeE' > >> c:\build\libs\python\build\bin\boost_python.dll\gcc\debug-python\runtime-link-dynamic\ > >> [snip] > >> Info: resolving boost::python::scope::current_scope by linking to > >> __imp___ZN5boost6python5scope13current_scopeE (auto-import) > > > > Try providing the necessary __declspec(dllimport)/__declspec(dllexport) > > to eliminate the auto-import. > > For one thing, I don't know which ones are "the neccessary" ones: > __head_boost_python_dll is not my symbol. I believe fixing the "__imp___ZN5boost6python5scope13current_scopeE" auto-import symbol will make the __head_boost_python_dll problems go away. I have seen similar problems with the Cygwin PostgreSQL build due to missing __declspec(dllimport)'s albeit with dlltool. Jason -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6 -- 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/