Wouldn't the smarter option be to update the sqlite bindings, rather
than the whole
interpreter to bleeding edge?
Maybe you've already tried it and it didn't fix whatever your issue
is, but seems like
it is worth giving a go.
See:
<http://oss.itsystementwicklung.de/trac/pysqlite/>
Martin
Those files are templates used by the configure script to generate the
final apr.h. Copying them as-is and using them to compile anything
will result in errors.
Are you installing using a "Typical" install option? Because that does
not install the headers. You need to install using "Custom" install
and enable the "Build Headers and Libraries" package.
--
Best Regards,
Nimrod A. Abing
W http://arsenic.ph/
W http://preownedcar.com/
W http://preownedbike.com/
W http://abing.gotdns.com/
I took a look at your original post and you mentioned Visual Studio
2008 Express. Do you have the Platform SDK installed? Are you building
this using the IDE? Make sure that you are not targetting the CLR.
--
Best Regards,
Nimrod A. Abing
Decided to take a stab at it so I tried building with Mingw instead of
VS 2008 (takes hours to install on my PC for some reason). I think
someone mentioned here that you have to compile everything with the
same compiler used to compile Apache and Python. But that's not
entirely true as long as you are using plain C and not C++. GCC and
MSVC compiler uses different name mangling conventions for C++ which
is why you will usually run into trouble if you link to a C++ DLL
module compiled using MSVC. I have successfully built Win32 programs
that linked to MSVC compiled DLL's and .lib files in the past. You
just need to use a couple of tools to create the appropriate format
libraries that Mingw ld can use.
I am able to get it to compile with a couple of warnings about
redefined #define. The problem is when I try to link it with the
Apache libs. The Python 2.6.1 binary from from python.org already has
a libpython26.a and I only needed to create the import libraries for
Apache. So, I went into Apache2.2/bin and did:
pexports libhttpd.dll > libhttpd.dll.def
dlltool -D libhttpd.dll -d libhttpd.dll.def -l libhttpd.dll.a
pexports libapr-1.dll > libapr-1.dll.def
dlltool -D libapr-1.dll -d libapr-1.dll.def -l libapr-1.dll.a
pexports libaprutil-1.dll > libaprutil-1.dll.def
dlltool -D libaprutil-1.dll -d libaprutil-1.dll.def -l libaprutil-1.dll.a
My gcc command line was:
gcc -shared -o mod_wsgi.so mod_wsgi.c -I "C:/Python26/include" -I
"C:/Program Files/Apache Software Foundation/Apache2.2/include" -L
"C:/Python26/libs" -L "C:/Program Files/Apache Software
Foundation/Apache2.2/bin" -lpython26 -lhttpd -lapr-1 -laprutil-1
The errors I got relate to failure to link _imp_ap* and _imp_apr*
functions. Maybe I'm just missing a command line option or a couple of
Windows specific defines. IIRC you need to add __declspec(dllexport)
to such functions. But I'm too drunk to figure it out at the moment.
Anyway, I hope this exercise becomes a useful starting point for
others wanting a mod_wsgi for Windows.
--
Best Regards,
Nimrod A. Abing
It's named python26.lib in Python 2.6.1 from official source at Python.org.
Just FYI, there are two commonly used Win32 binaries of Python out
there. One is the official build from Python.org. The other one is a
"quality assured" build provided by ActiveState called ActivePython.
--
Best Regards,
Nimrod A. Abing