Original Translation
197
foo foomodule.c
198
must be linked with the math library :file:`libm.a` on your platform, simply add :option:`-lm` to the line::
199
foo foomodule.c -lm
200
Arbitrary switches intended for the compiler or the linker can be supplied with the :option:`-Xcompiler` *arg* and :option:`-Xlinker` *arg* options::
201
foo foomodule.c -Xcompiler -o32 -Xlinker -shared -lm
202
The next option after :option:`-Xcompiler` and :option:`-Xlinker` will be appended to the proper command line, so in the above example the compiler will be passed the :option:`-o32` option, and the linker will be passed :option:`-shared`. If a compiler option requires an argument, you'll have to supply multiple :option:`-Xcompiler` options; for example, to pass ``-x c++`` the :file:`Setup` file would have to contain ``-Xcompiler -x -Xcompiler c++``.
203
Compiler flags can also be supplied through setting the :envvar:`CFLAGS` environment variable. If set, the contents of :envvar:`CFLAGS` will be added to the compiler flags specified in the :file:`Setup` file.
204
Using non-Microsoft compilers on Windows
205
Borland/CodeGear C++
206
This subsection describes the necessary steps to use Distutils with the Borland C++ compiler version 5.5. First you have to know that Borland's object file format (OMF) is different from the format used by the Python version you can download from the Python or ActiveState Web site. (Python is built with Microsoft Visual C++, which uses COFF as the object file format.) For this reason you have to convert Python's library :file:`python25.lib` into the Borland format. You can do this as follows: