error: '::hypot' has not been declared

Original: https://blog.csdn.net/weixin_37993251/article/details/88054384

In pip install pyamg time error c: \ tools \ mingw \ bin ../ lib / gcc / i686-pc-mingw32 / 4.7.0 /../../../../ include / c ++ / xxx / the cmath: 1096:. 11: error: ':: hypot' Not has been declared 
error: Command 'C: Program Files \\ \\ \\ x86_64-7.1.0 MinGW-W64-POSIX-SEH-rt_v5-REV2 \\ mingw64 \\ bin \\ gcc.exe 'failed with exit status 1
where the fundamental reason is because the definition of hypot as _hypot in pyconfig.h in, so the solution is

1. Find your mingw64 folder path C: \ Program Files \ mingw- w64 \ x86_64-7.1.0-posix-seh-rt_v5-rev2 \ mingw64 \ lib \ gcc \ x86_64-w64-mingw32 \ 7.1.0 \ the include \ c ++
2. cmath files found


3. Add in the file header
#define _hypot hypot
4. Save and re-run

Guess you like

Origin www.cnblogs.com/hichens/p/11595583.html