我ntdll.lib在代碼中使用函式將系統計時器設定為更高的解析度。
但是當我構建我的專案時,我收到了這個錯誤:
...
.../bin/ld.exe: ... undefined reference to `__imp_NtSetTimerResolution'
collect2.exe: error: ld returned 1 exit status
...
我如何告訴聯結器ntdll.lib在我的 CMake 中鏈接?
uj5u.com熱心網友回復:
這對我有用:
if (WIN32)
target_link_libraries(executable ntdll)
endif()
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/328727.html
