Hey all. I'm working on a project which currently only compiles under MSVC. I wish to port it to compile under GCC via MinGW-w64 also, however I've hit a brick-wall with a slew of compile errors I'm getting when using Boost.Python in my project. I'm not quite sure who's "fault" this problem is... Mine? Boost? GCC? libstdc++? MinGW-w64? Something else?

I'm using TDM-GCC 4.5.1.
http://tdm-gcc.tdragon.net/

Anyway, here is an example build output:
http://raptorfactor.privatepaste.com/54e19acdc1

Ignore the errors in the 'MMHelper' project to do with exception routines, they are something else that I already know the cause and solution for. The problem I'm referring to is this one:
gcc.compile.c++ Scripting\bin\gcc-mingw-4.5.1\debug\address-model-32\link-static\MemSandbox\Main.o
In file included from c:\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.1/include/c++/cmath:629:0,
                 from c:\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.1/include/c++/random:38,
                 from c:\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.1/include/c++/bits/stl_algo.h:66,
                 from c:\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.1/include/c++/algorithm:63,
                 from E:\Code\Boost/boost/function/detail/prologue.hpp:13,
                 from E:\Code\Boost/boost/function/function_template.hpp:13,
                 from E:\Code\Boost/boost/function/detail/maybe_include.hpp:13,
                 from E:\Code\Boost/boost/function/function0.hpp:11,
                 from E:\Code\Boost/boost/python/errors.hpp:13,
                 from E:\Code\Boost/boost/python/handle.hpp:11,
                 from E:\Code\Boost/boost/python/args_fwd.hpp:10,
                 from E:\Code\Boost/boost/python/args.hpp:10,
                 from E:\Code\Boost/boost/python.hpp:11,
                 from Scripting\MemSandbox\Main.cpp:38:
c:\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.1/include/c++/tr1_impl/cmath:203:11: error: '::hypot' has not been declared

    "g++"  -ftemplate-depth-128 -O0 -fno-inline -w -g -m32 -std=c++0x -DBOOST_FILESYSTEM_VERSION=3 -DBOOST_PYTHON_STATIC_LIB -DBOOST_SYSTEM_STATIC_LINK=1 -DBOOST_THREAD_USE_LIB=1 -DDATE_TIME_INLINE -DUNICODE -D_UNICODE -Dnullptr=NULL  -I"C:\Python27\Include" -I"E:\Code\Boost" -I"Common" -I"Dependencies" -I"Dependencies\BeaEngine" -I"Memory" -c -o "Scripting\bin\gcc-mingw-4.5.1\debug\address-model-32\link-static\MemSandbox\Main.o" "Scripting\MemSandbox\Main.cpp"

...failed gcc.compile.c++ Scripting\bin\gcc-mingw-4.5.1\debug\address-model-32\link-static\MemSandbox\Main.o...

I'm at a loss as to how to fix this. I'm suspecting it's a MinGW problem, but I'm unable to find anybody else who has had or is having the same problem...

I'm using Boost.Build as my build system. Relevant Jamfiles can be found here:
http://code.google.com/p/hadesmem/source/browse/trunk/Jamroot
http://code.google.com/p/hadesmem/source/browse/trunk/Common/Jamfile.v2
http://code.google.com/p/hadesmem/source/browse/trunk/Dependencies/Jamfile.v2
http://code.google.com/p/hadesmem/source/browse/trunk/HadesMem/Jamfile.v2
http://code.google.com/p/hadesmem/source/browse/trunk/Memory/Jamfile.v2
http://code.google.com/p/hadesmem/source/browse/trunk/Scripting/Jamfile.v2

Build command-line(s) here:
http://code.google.com/p/hadesmem/source/browse/trunk/Build_Debug_AMD64_GCC.bat
http://code.google.com/p/hadesmem/source/browse/trunk/Build_Debug_IA32_GCC.bat
http://code.google.com/p/hadesmem/source/browse/trunk/Build_Release_AMD64_GCC.bat
http://code.google.com/p/hadesmem/source/browse/trunk/Build_Release_IA32_GCC.bat

If anyone could shed some light as to what's going wrong here and how I might fix it I'd really appreciate it. Thanks in advance.