[DB-SIG] Help with compiling the mxODBC package under Windows

M.-A. Lemburg mal@lemburg.com
Wed, 31 Mar 1999 18:51:30 +0200

Murray Todd Williams wrote:
> My kingdom for a Makefile!
> I'll be the first to admit I don't know much about the MS VC++ that I
> have.  I'm usually working in Linux, and the only time I use VC++ is
> through the command line.  The instructions provided for building the
> mxODBC are a bit beyond me.
> (I) I don't know how to "point the compiler to Python/Include" or "point
> the linker to Python/Lib".
> (II) When I setup a blank DLL project and add the appropriate files, the
> target is a single DLL (I named the project mxODBC which I assume would
> be the right thing.) but the instructions mention renaming MULTIPLE
> *.dll files to *.pyd.

As the docs say, the instructions are """adapted from generic
by Gordon McMillan""".

You actually don't need to rename any file (Python will load the
DLL file just as it would the PYD file), it's only a little less
troublesome having PYD files around instead of DLLs, because of
naming issues. There's only one DLL being generated for mxODBC.

> (III) When I do my best to get some sort of command line compilation
> with
>     cl /I..\..\Include mxODBC.cpp /DL
> I get the following errors:
> mxODBC.cpp(3559) : error C2086: 'mxODBCCursor_Type" : redefinition
> mxODBC.cpp(4016) : error C2086: "mxODBC_Type" : redefinition
> I'm stuck at this point.  Could someone please give me a clue?  The
> (prerequisite) mxDateTime was (almost) completely painless.

Try the current pre-release version of mxODBC: it includes a
set of project files for VC6 donated by Stephen Ng.

Note that mxODBC is currently undergoing some rather big changes
because I want to make it DB API 2.0 compatible, so the next
release might be named 1.1.0 or even 2.0.0 -- in a few weeks

Marc-Andre Lemburg                               Y2000: 275 days left
          : Python Pages >>> http://starship.skyport.net/~lemburg/  :