-
Notifications
You must be signed in to change notification settings - Fork 576
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
在 Windows 上构建 rime_console.exe 的方法 #479
Comments
rime_console 的用途用法,有文档吗? |
@Ace-Who rime_api_console 主要是展示如何使用 Rime API,而 rime_console 是直接调用 Rime 内部的组件,都是 demo,没有文档 |
高明 |
我想获取当前是否可输入状态,如果是可输入状态,想知道光标所在的坐标, |
|
我试了一下,Windows下,rime_console可以这样构建成功,但是参照类似的方法#define RIME_IMPORTS 1 构建rime_deployer还是不行,出现了错误:unresolved external symbol "char const * * rime::kDeployerModules"。 |
Fixed by #700 |
想要构建 rime_console.exe 进行测试,但是看到代码注释说由于 MSVC 不会 export 所有 symbol 而无法构建
librime/tools/CMakeLists.txt
Line 36 in cb7124a
研究了下发现 CMake 提供了 CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 这个变量来解决这个问题。
librime/src/CMakeLists.txt
Line 74 in b2abd09
实测只要在这行下方添加
并且在
rime_console.cc
顶部添加#define RIME_IMPORTS 1
即可进行构建(不添加的话 MSVC 不会 import DLL 里的变量,只 import 方法,导致找不到rime::kDefaultModules
)。rime_deployer.exe
同理。而rime_dict_manager.exe
则无需上述 preprocessor 即可构建。缺点是构建的 rime.dll 体积由 2537KB 增长到 3391KB (+33%),或许可以作为一个选项供需要的人使用。
The text was updated successfully, but these errors were encountered: