This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: Symbol in DLL begin with _ (was: building Python extension modules)
- To: <cygwin at sources dot redhat dot com>
- Subject: Re: Symbol in DLL begin with _ (was: building Python extension modules)
- From: "Peter Bienstman" <Peter dot Bienstman at rug dot ac dot be>
- Date: Fri, 3 Aug 2001 16:57:42 +0200
- Reply-To: <Peter dot Bienstman at rug dot ac dot be>
I'm having similar problems, however the suggestions in this thread do not
solve my problems.
I'm trying to build a simple C++ extension module for Python using Boost.
In convert.cpp, the file containing the extension module, there is a macro
which expands to
extern "C" __attribute__(( dllexport )) void initconvert ()
{
...
}
This is the main entry point for the dll, so I assume I do not have to use
the def file approach.
Adapting the mkdll.sh script from this thread, I do the following to create
the dll:
dllwrap -o convert.dll convert.o
/users/pbienst/tmp/boost_cvs/libs/python/src/libboost_python.a -L/usr/lib/py
thon2.1/config -lpython2.1 -lstdc++ -Wl,--kill-at,--enable-stdcall-fixup
This fails because of underscores that are prepended to the symbols in
libboost_python.a and that the linker is unable to resolve.
I've also tried other approaches, like using a def-file, or another approach
which mirrors more closely what distutils is doing:
g++ -shared -Wl,--enable-auto-image-base convert.o
/users/pbienst/tmp/boost_cvs/libs/python/src/*.o -L/usr/lib/python2.1/config
-lpython2.1 -o convert.dll
Same problem...
Any help would be greatly appreciated.
-------------------------------------
Peter Bienstman
Department of Information Technology
INTEC/IMEC - Ghent University
St.-Pietersnieuwstraat 41
B-9000 Gent - Belgium
E-mail: Peter.Bienstman@rug.ac.be
Tel: +32 9 264 3445
Fax: +32 9 264 3593
-------------------------------------
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/