InterviewSolution
| 1. |
How Do I Build Wxpython On Windows? |
|
Answer» The Windows builds CURRENTLY require the use of Microsoft Visual C++. Theoretically, other compilers (such as mingw32 or the Borland compilers) can also be used but I've never done the work to make that happen. If you want to try that then first you'll want to find out if there are any tricks that have to be done to make Python extension modules using that compiler, and then make a few changes to setup.py to accommodate that. (And send the patches to me.) If you plan on using VisualStudio.Net (a.k.a. MSVC 7.1) keep in MIND that you'll also have to BUILD Python and any other extension modules that you use with that compiler because a different version of the C runtime library is used. The Python executable that comes from PythonLabs and the wxPython extensions that I distribute are built with MSVC 6 with all the Service Packs applied. This policy will change with Python 2.4 and MSVC 7.1 will be used starting with that version. If you want to build a debuggable version of wxWidgets and wxPython you will need to have also built a debug version of Python and any other extension modules you need to use. You can tell if you have them already if there is a _d in the file names, for example python_d.exe or python23_d.dll. If you don't need to trace through the C/C++ parts of the code with the debugger then building the normal (or hybrid) version is fine, and you can use the regular python executables with it. Starting with 2.5.3.0 wxPython can be built for either the monlithic or the multi-lib wxWidgets builds. (Monolithic means that all the core wxWidgets code is in one DLL, and multi-lib means that the core code is divided into multiple DLLs.) To select which one to use specify the MONOLITHIC flag for both the wxWidgets build and the wxPython build as shown below, setting it to either 0 or 1. Just LIKE the unix versions I also use some scripts to HELP me build wxWidgets, but I use some non-standard stuff to do it. So if you have bash (cygwin or probably MSYS too) or 4NT plus unix-like cat and sed programs then there is a copy of my wxWidgets build scripts in %WXDIR%wxPythondistribmsw. Just copy them to %WXDIR%buildmsw and you can use them to do your build, otherwise you can do everything by hand as described below. But if you do work by hand and something doesn't seem to be working correctly please refer to the build scripts to see what may need to be done differently. The Windows builds currently require the use of Microsoft Visual C++. Theoretically, other compilers (such as mingw32 or the Borland compilers) can also be used but I've never done the work to make that happen. If you want to try that then first you'll want to find out if there are any tricks that have to be done to make Python extension modules using that compiler, and then make a few changes to setup.py to accommodate that. (And send the patches to me.) If you plan on using VisualStudio.Net (a.k.a. MSVC 7.1) keep in mind that you'll also have to build Python and any other extension modules that you use with that compiler because a different version of the C runtime library is used. The Python executable that comes from PythonLabs and the wxPython extensions that I distribute are built with MSVC 6 with all the Service Packs applied. This policy will change with Python 2.4 and MSVC 7.1 will be used starting with that version. If you want to build a debuggable version of wxWidgets and wxPython you will need to have also built a debug version of Python and any other extension modules you need to use. You can tell if you have them already if there is a _d in the file names, for example python_d.exe or python23_d.dll. If you don't need to trace through the C/C++ parts of the code with the debugger then building the normal (or hybrid) version is fine, and you can use the regular python executables with it. Starting with 2.5.3.0 wxPython can be built for either the monlithic or the multi-lib wxWidgets builds. (Monolithic means that all the core wxWidgets code is in one DLL, and multi-lib means that the core code is divided into multiple DLLs.) To select which one to use specify the MONOLITHIC flag for both the wxWidgets build and the wxPython build as shown below, setting it to either 0 or 1. Just like the unix versions I also use some scripts to help me build wxWidgets, but I use some non-standard stuff to do it. So if you have bash (cygwin or probably MSYS too) or 4NT plus unix-like cat and sed programs then there is a copy of my wxWidgets build scripts in %WXDIR%wxPythondistribmsw. Just copy them to %WXDIR%buildmsw and you can use them to do your build, otherwise you can do everything by hand as described below. But if you do work by hand and something doesn't seem to be working correctly please refer to the build scripts to see what may need to be done differently. |
|