'::hypot' has not been declared

后端 未结 3 1343
臣服心动
臣服心动 2020-12-18 00:05

I\'m using python3.6 theano, with mingw-w64-x86-64 installed, my os is Win10_64, cuda installed, and seems everything is ok

the theano.test() is ok, saying my gpu

相关标签:
3条回答
  • 2020-12-18 00:21

    My guess from your incomplete information is that you aren't compiling in C++11 mode so you aren't picking up ::hypot from C99.

    0 讨论(0)
  • 2020-12-18 00:36

    I had this error with building an python file using mingw32 . I opened the file that it says (C:/mingw64/lib/gcc/x86_64-w64-mingw32/6.3.0/include/c++/cmath:1157:11)
    and changed that line to

    using ::_hypot;
    

    or adding this line just before that :

    #define hypot _hypot
    

    and after that the problem was solved !! I know it's not a basic solution but it is the one that I could find !!

    0 讨论(0)
  • 2020-12-18 00:44

    (This answer was posted in comments originally)

    I had to keep the original mingw cmath header (otherwise libpng would not build) and I commented out the #define hypot _hypot in pyconfig.h (line 241).

    0 讨论(0)
提交回复
热议问题