Python module build error. Compiler doesn't understand C++ syntax

I'm trying to build a Python module written in C++. In the module file I use C++ types I defined in other files and I include their header files in the C++ module file.

The problem I'm having is that when I build the module with my build script (listed below) I get errors implying that the compiler doesn't understand C++ syntax. I get the error listed below. I included the directory containing the types I use as include_dirs and library_dirs in the Extension command in my build script but that didn't help.