rime / librime

Rime Input Method Engine, the core library
https://rime.im
BSD 3-Clause "New" or "Revised" License
3.37k stars 551 forks source link

编译出错: 错误:‘exp’在此作用域中尚未声明 #636

Closed htqx closed 1 year ago

htqx commented 1 year ago

Describe the bug arch linux 下载,然后安装说明上的那些以来,然后编译,然后出错。

To Reproduce Steps to reproduce the bug: 编译,然后出错。

Expected behavior A clear and concise description of what you expected to happen.

Log If applicable, add crash log to quick focus your problem.

Screenshots If applicable, add screenshots to help explain your problem.

Flavor(please complete the following information): Select your flavor:

Package:

Additional context Add any other context about the problem here. [ 63%] Building CXX object src/CMakeFiles/rime.dir/rime/gear/script_translator.cc.o /home/htqx/apps/ibus-rime/librime/src/rime/gear/script_translator.cc: 在成员函数‘void rime::ScriptTranslation::PrepareCandidate()’中: /home/htqx/apps/ibus-rime/librime/src/rime/gear/script_translator.cc:490:23: 错误:‘exp’在此作用域中尚未声明 490 | cand->set_quality(exp(entry->weight) + | ^~~ /home/htqx/apps/ibus-rime/librime/src/rime/gear/script_translator.cc:504:23: 错误:‘exp’在此作用域中尚未声明 504 | cand->set_quality(exp(entry->weight) + | ^~~ make[3]: [src/CMakeFiles/rime.dir/build.make:1238:src/CMakeFiles/rime.dir/rime/gear/script_translator.cc.o] 错误 1 make[2]: [CMakeFiles/Makefile2:260:src/CMakeFiles/rime.dir/all] 错误 2 make[1]: [Makefile:146:all] 错误 2 make[1]: 离开目录“/home/htqx/apps/ibus-rime/librime/build” make: [Makefile:43:release] 错误 2

eagleoflqj commented 1 year ago

master已经修复了此问题 https://github.com/rime/librime/blob/e391bc2cd9b37edbaf94b2aeab5a969a1b37944d/src/rime/gear/script_translator.cc#L11 在docker的archlinux/archlinux:latest测了一下可以编译