英文:
Emscripten compiling Python error: Linking globals named 'hypot': symbol multiply defined
问题
在链接阶段出现错误:error: Linking globals named 'hypot': symbol multiply defined!
,似乎是在说全局函数 hypot
存在多个定义。我已在 pymath.c
中查找过 grep
,只找到一个定义。我该如何解决这个问题?
英文:
I am trying to build Python with emscripten and link it to my main program, but during the linking stage im getting:
error: Linking globals named 'hypot': symbol multiply defined!
which seems to be saying that there are multiple definitions of the global function hypot
, I have grep
ped hypot and only found one definition in pymath.c.
How do i fix this problem?
答案1
得分: 0
问题是emscripten在通过emsdk提供C标准库时定义了hypot。所以解决方案是进入pyconfig.h并#define HAVE_HYPOT 1
。
英文:
The problem was emscripten was defining hypot when it provides the C standard library through emsdk. So the solution is to go into pyconfig.h and to #define HAVE_HYPOT 1
.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论