怎么才能不去推测要链接的文件? #5957
-
我目前编写的程序需要用到一个叫 pylon 的库,这个库提供的预编译版本只有 MD 版本的,我目前用下面的脚本添加这个库的所有文件: -- Pylon
local pylon_path = "third_party/pylon"
local pylon_lib_path = pylon_path .. "/lib/x64"
local pylon_include_path = pylon_path .. "/include"
local pylon_runtime_path = pylon_path .. "/Runtime/x64"
-- add_linkdirs(pylon_lib_path)
local pylon_lib_files = os.files(path.join(pylon_lib_path, "*.lib"))
for _, lib_file in ipairs(pylon_lib_files) do
local lib_name = path.basename(lib_file):match("(.*)%.lib$")
add_links(lib_name)
end 这些库文件的名字有一些类似
我当中的 |
Beta Was this translation helpful? Give feedback.
Answered by
star-hengxing
Dec 12, 2024
Replies: 1 comment 1 reply
-
msvc 一个功能:https://en.wikipedia.org/wiki/Auto-linking 如果能像 boost 一样,有一个宏 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
batu1579
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
msvc 一个功能:https://en.wikipedia.org/wiki/Auto-linking
如果能像 boost 一样,有一个宏
BOOST_ALL_NO_LIB
可以关闭更好,否则只能手动去掉头文件里 auto-link 代码。