[Pythonmac-SIG] Building mxDateTime for Python 2.0

Vincent Marchetti vincem@en.com
Tue, 21 Nov 2000 23:51:31 -0500


I am trying to re-compile the mxDateTime shared library to let me use
DateTime in Python 2.0 -- the shared library provided throws exception on
import about using the wrong version. I have never compiled any type of
shared library before, so girding my loins and firing up CW 5 I set up a
shared library project and:
1. included the mxDateTime.c code
2. included stub libraries PythonCore and MSL ShLibRuntime.Lib
Result: -- Link failure, could not find function 'floor'

I knew this is a standard C function, so I threw the stub MathLib into the
pot and cooked.
Got a bunch of warnings about duplicate definitions of math functions (in
PythonCore and MathLib). Decided to ignore warnings. Successfully made the
shared library, successfully imported DateTime into Python 2.0 (actually
2.0b1). However, the test script for mxDateTime failed an assertion.
Basically, a function DateTimeFromTicks, which uses the floor function,
fails to give predicted  results.

My question: Am I including the correct library in my project to get the
"right" version of floor?

Thanks,

Vince Marchetti