### Installing on Windows ### 1) Extract the zip file 2) Double click the PySimTK-.win32-py2.6.exe 3) Follow the instructions to install the python modules 4) Drag the PySimTK directory containing "doc" and "examples" folders into your "C:\Program Files\" folder. ### Building from source (way advanced) ### This project is for creating wrappers for the SimTK multibody dynamics toolkit. 1) Prerequisites ================ * (if on Windows) Install Visual Studio 9 (2008) C++ http://www.microsoft.com/express/downloads/ * Install the SimTK core toolkit https://simtk.org/home/simtkcore * Install Python 2.6 http://www.python.org/download/releases/2.6/ * Install boost http://www.boost.org/ be sure to include the boost.python module http://www.boostpro.com/download for windows installer Apply the following patch to boost python (at least up to version 1.42) in header file boost/python/detail/destroy.hpp, near line 33: change template static void execute(T const volatile* p) { p->T::~T(); } to template static void execute(Type const volatile* p) { p->Type::~Type(); } (i.e. change "T" to "Type") * Install gccxml cvs -d :pserver:anonymous@www.gccxml.org:/cvsroot/GCC_XML login (respond with password gccxml) cvs -d :pserver:anonymous@www.gccxml.org:/cvsroot/GCC_XML co gccxml (install using cmake) (add location of gccxml.exe to your PATH) (on windows: run gccxml_vcconfig.bat from install area) * Install pygccxml and pyplusplus svn checkout https://pygccxml.svn.sourceforge.net/svnroot/pygccxml/pygccxml_dev pygccxml cd pygccxml python setup.py build python setup.py install cd .. svn checkout https://pygccxml.svn.sourceforge.net/svnroot/pygccxml/pyplusplus_dev pyplusplus cd pyplusplus python setup.py build python setup.py install * Install epydoc (for creating html documentation) 2) Generating module source code with pyplusplus ================================================ cd src python generate_simtk_common_source.py 3) Building and installing SimTK wrappers ========================================= python setup.py build python setup.py install * OR * python setup.py install --home= Tips for extending and debugging ================================ Step 1: Wrap classes To wrap more classes, add additional headers to the module_builder_t constructor in generate__source.py. Step 2: Debug wrapper generation "python generate_whatever_source.py" produces many warning messages about wrapping details that need to be addressed. Aim to eliminate all of these warning messages. I have added the text of many warning messages in the comments of generate_whatever_source.py programs, followed by the pyplusplus code used to address the warning. You can use these as examples of how to address such warnings. Step 3: Debug compile time issues After the source code is generated, there are compile time warnings and errors that can also be informative. Make those go away too. Step 4: Debug link errors You may need to .exclude() some methods that are actually not implemented in the library you are wrapping. Step 5: Debug python modules Create test programs in test to exercise the API that has been wrapped.