Nmake Error (trying To Use Python With Wamp)
Solution 1:
This is a problem with configuration in mod_wsgi make file. When building win32-ap22py31.mk, nmake needs to know proper Apache and Python include and library paths. After that nmake knows where to compile and link object files needed to output mod_wsgi.so
First check where are Apache and Python installed and take those paths. You will need them to modify make file.
We use python 2.7 so directory paths are a little bit different than your version.
Open up win32-ap22py31.mk in text editor like Notepad++.
You will see lines like:
CPPFLAGS = \
/DWIN32 \
/DNDEBUG \
/I"c:\Program Files\Microsoft Visual Studio 9.0\VC\include" \
/I"c:\Program Files\Microsoft SDKs\Windows\v6.0A\Include" \
/I"C:\apache2.2\include" \
/I"C:\Python27\PC"
Here you should set path to include files used by make file from apache and python installations. They start with /I directive and should end with "\" if you transfer command to next line. If you need more include paths, add them here too. Do not add "\" at end of directory path as it will probably break build and you will get build error. Also check if include lines are proper for your installation of VC++ and SDK (first two lines).
For libarary files:
LDFLAGS = \
/link \
"/LIBPATH:c:\Program Files\Microsoft Visual Studio 9.0\VC\lib" \
"/LIBPATH:c:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib" \
"/LIBPATH:C:\apache2.2\lib" \
"/LIBPATH:C:\Python27\PCbuild" \
/OPT:REF \
/OPT:ICF=2 \
/RELEASE \
/SUBSYSTEM:WINDOWS
Here you should add library paths with /LIBPATH directive instead of /I.
And for the used libraries change following command:
LDLIBS = \
python27.lib \
libhttpd.lib \
libapr-1.lib \
libaprutil-1.lib
Set python31.lib if not using python27.lib.
libhttpd.lib, libapr-1.lib and libaprutil-1.lib are libraries compiled during Apache2.2 build.
Post a Comment for "Nmake Error (trying To Use Python With Wamp)"