[Pyrex] Undefined references message when compiling

stephen at theboulets.net stephen at theboulets.net
Thu May 17 19:06:18 UTC 2007


> stephen at theboulets.net wrote:
> Use distutils to build your extension module. Don't try to compile it by
> hand.
> Don't hardcode the path to Python.h.
>
>   http://docs.python.org/dist/dist.html
>   http://docs.python.org/dist/single-ext.html
>   http://docs.python.org/inst/inst.html

Thanks for the help. Any idea how to pass the "-c" option to setup.py?

Stephen
>python setup.py build_ext --inplace
running build_ext
error: Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible
binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin
installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.

Trying to pass "-c":

>python -c mingw32 setup.py build_ext --inplace
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'mingw32' is not defined

>python setup.py -c mingw32 build_ext --inplace
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: option -c not recognized




More information about the Pyrex mailing list