Conversation
39b8366 to
b2dfdb1
Compare
|
Even if we change gcc to clang, all program compiled by gcc to programs compiled by clang, it still output .dll.a not .lib. $ 7z l pyrime-0.2.3-cp314-cp314-win_amd64.whl|rg api.cp
19:2026-07-01 08:37:28 ..... 177152 70661 pyrime/api.cp314-win_amd64.pyd
20:2026-07-01 08:37:28 ..... 1536 414 pyrime/api.cp314-win_amd64.dll.aHowever, clang support to output .lib: Such as https://github.com/rime/librime/releases/download/1.17.0/rime-33e7814-Windows-clang-x64.7z $ 7z l rime-33e7814-Windows-clang-x64.7z|rg dist/lib/rime
32:2026-06-05 19:42:26 ....A 301604 dist/lib/rime.lib
38:2026-06-05 19:42:26 ....A 5289472 dist/lib/rime.dllI doubt clang has an option to decide output .lib or .dll.a . |
|
I tried following piece of code in if sys.platform == "win32":
lib_dir = os.environ.get("LIBRIME_LIB_DIR")
if lib_dir and os.path.isdir(lib_dir):
os.add_dll_directory(lib_dir)Just put official |
|
The convention on Windows is to pack |
|
I know your meaning, if user doesn't install librime, it will not work because there is no any librime. In that situation, user must
|
|
May I interpret your words in following manner: It is the user (front-end)'s responsibility to invoke However, this requires the front-end to set directory before importing packages from import os
os.add_dll_directory(some_dir_containing_rime_dll)
from pyrime.api import Traits
trait = Traits(...)But in most cases, people are used to importing packages before other code. This will lead to exception of DLL not found. That's why I was adding the path setting in Just my two cents. |
I think a better approach would be to set the |
Fix #9