Skip to content

ASIO linker errors on cpal 0.17 #1104

Description

@glekDev

tried running
cargo run --example enumerate --features asio
on the latest branch and on "0.17.0" tag

ran into:

$ cargo run --example enumerate --features asio
   Compiling cpal v0.17.0 (F:\CODE\cpal-0.17.0)
error: linking with `link.exe` failed: exit code: 1120
  |
  = note: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.50.35717\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "C:\\Users\\user\\AppData\\Local\\Temp\\rustcGWqfVg\\symbols.o" "<44 object files omitted>" "F:\\CODE\\cpal-0.17.0\\target\\de
indows_link-750c1e8395263f2e,libasio_sys-a3f178330438e552,libnum_traits-421cd4ba7d59e934,libanyhow-60aa99bfda26100b}.rlib" "<sysroot>\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib/{libstd-*,libpanic_unwind-*,libcfg_if-*,libwindows_targets-*,librustc_demangle-*,libstd_detect
32.lib" "ntdll.lib" "userenv.lib" "ws2_32.lib" "dbghelp.lib" "/defaultlib:msvcrt" "/NXCOMPAT" "/LIBPATH:F:\\CODE\\cpal-0.17.0\\target\\debug\\build\\asio-sys-d922dc70ba91173d\\out" "/LIBPATH:F:\\CODE\\cpal-0.17.0\\target\\debug\\build\\asio-sys-d922dc70ba91173d\\out" "/O
etc\\liballoc.natvis" "/NATVIS:<sysroot>\\lib\\rustlib\\etc\\libcore.natvis" "/NATVIS:<sysroot>\\lib\\rustlib\\etc\\libstd.natvis" "/NATVIS:C:\\Users\\user\\AppData\\Local\\Temp\\rustcGWqfVg\\enumerate-0.natvis" "/NATVIS:C:\\Users\\user\\AppData\\Local\\Temp\\rus
  = note: some arguments are omitted. use `--verbose` to show all linker arguments
  = note: libasio_sys-a3f178330438e552.rlib(66a90b18778ddb97-asiolist.o) : error LNK2019: unresolved external symbol __imp_RegCloseKey referenced in function "public: __cdecl AsioDriverList::AsioDriverList(void)" (??0AsioDriverList@@QEAA@XZ)␍
          libasio_sys-a3f178330438e552.rlib(66a90b18778ddb97-asiolist.o) : error LNK2019: unresolved external symbol __imp_RegEnumKeyA referenced in function "public: __cdecl AsioDriverList::AsioDriverList(void)" (??0AsioDriverList@@QEAA@XZ)␍
          libasio_sys-a3f178330438e552.rlib(66a90b18778ddb97-asiolist.o) : error LNK2019: unresolved external symbol __imp_RegOpenKeyA referenced in function "public: __cdecl AsioDriverList::AsioDriverList(void)" (??0AsioDriverList@@QEAA@XZ)␍
          libasio_sys-a3f178330438e552.rlib(66a90b18778ddb97-asiolist.o) : error LNK2019: unresolved external symbol __imp_RegOpenKeyExA referenced in function "long __cdecl findDrvPath(char *,char *,int)" (?findDrvPath@@YAJPEAD0H@Z)␍
          libasio_sys-a3f178330438e552.rlib(66a90b18778ddb97-asiolist.o) : error LNK2019: unresolved external symbol __imp_RegQueryValueExA referenced in function "long __cdecl findDrvPath(char *,char *,int)" (?findDrvPath@@YAJPEAD0H@Z)␍
          F:\CODE\cpal-0.17.0\target\debug\examples\enumerate.exe : fatal error LNK1120: 5 unresolved externals␍

error: could not compile `cpal` (example "enumerate") due to 1 previous error

doing the same on the "0.16.0" works fine.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions