Closed Jaage closed 1 year ago
So I am a dumb end user who did not have ///@export
and
extendr_module! {
mod rustUtils;
fn get_probs;
}
With those, I get a different error:
Finished release [optimized] target(s) in 1.43s
gcc -shared -static-libgcc -o rustUtils.dll rustUtils-win.def entrypoint.o -L./rust/target/x86_64-pc-windows-gnu/release -lrustUtils -lws2_32 -ladvapi32 -luserenv -lbcrypt -LC:/rtools42/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/rtools42/x86_64-w64-mingw32.static.posix/lib -LC:/PROGRA~1/R/R-42~1.1/bin/x64 -lR
C
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(dirs_sys-75c82abcdc21f926.dirs_sys.8e88a5c2-cgu.2.rcgu.o):dirs_sys.8e88a5c2-:(.text+0x4d): undefined reference to `CoTaskMemFree'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(dirs_sys-75c82abcdc21f926.dirs_sys.8e88a5c2-cgu.2.rcgu.o):dirs_sys.8e88a5c2-:(.text+0x74): undefined reference to `CoTaskMemFree'
C
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.1.rcgu.o):sysinfo.2ae7d728-c:(.text+0x89): undefined reference to `RtlGetVersion'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.1.rcgu.o):sysinfo.2ae7d728-c:(.text+0xc77): undefined reference to `NtQueryInformationProcess'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.1.rcgu.o):sysinfo.2ae7d728-c:(.text+0xcf0): undefined reference to `EnumProcessModulesEx'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.1.rcgu.o):sysinfo.2ae7d728-c:(.text+0xd28): undefined reference to `GetModuleBaseNameW'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.1.rcgu.o):sysinfo.2ae7d728-c:(.text+0xd98): undefined reference to `GetModuleFileNameExW'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinf
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.1.rcgu.o):sysinfo.2ae7d728-c:(.text+0x13c9): undefined reference to `GetModuleFileNameExW'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.1.rcgu.o):sysinfo.2ae7d728-c:(.text+0x276c): undefined reference to `NtQueryInformationProcess'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.1.rcgu.o):sysinfo.2ae7d728-c:(.text+0x2872): undefined reference to `NtQueryInformationProcess'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.1.rcgu.o):sysinfo.2ae7d728-c:(.text+0x389e): undefined reference to `NtQueryInformationProcess'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.1.rcgu.o):sysinfo.2ae7d728-c:(.text+0x3916): undefined reference to `NtQueryInformationProcess'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.1.rcgu.o):sysinfo.2ae7d728-c:(.text+0x3a00): undefined reference to `GetProcessMemoryInfo'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.3.rcgu.o):sysinfo.2ae7d728-c:(.text+0x856): undefined reference to `CoUninitialize'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.4.rcgu.o):sysinfo.2ae7d728-c:(.text+0x7c): undefined reference to `PdhOpenQueryA'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.4.rcgu.o):sysinfo.2ae7d728-c:(.text+0xa2): undefined reference to `PdhAddEnglishCounterA'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.4.rcgu.o):sysinfo.2ae7d728-c:(.text+0xb0): undefined reference to `PdhCloseQuery'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.4.rcgu.o):sysinfo.2ae7d728-c:(.text+0xfa): undefined reference to `PdhCollectQueryDataEx'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.4.rcgu.o):sysinfo.2ae7d728-c:(.text+0x15b): undefined reference to `PdhRemoveCounter'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-win
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.4.rcgu.o):sysinfo.2ae7d728-c:(.text+0x165): undefined reference to `PdhCloseQuery'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.4.rcgu.o):sysinfo.2ae7d728-c:(.text+0x4ea): undefined reference to `PdhGetFormattedCounterValue'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.4.rcgu.o):sysinfo.2ae7d728-c:(.text+0x66b): undefined reference to `PdhRemoveCounter'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.4.rcgu.o):sysinfo.2ae7d728-c:(.text+0x6ca): undefined reference to `PdhCloseQuery'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.4.rcgu.o):sysinfo.2ae7d728-c:(.text+0x6fc): undefined reference to `PdhOpenQueryA'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.4.rcgu.o):sysinfo.2ae7d728-c:(.text+0x89f): undefined reference to `PdhGetFormattedCounterValue'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.4.rcgu.o):sysinfo.2ae7d728-c:(.text+0xa27): undefined reference to `PdhAddEnglishCounterW'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinf
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.4.rcgu.o):sysinfo.2ae7d728-c:(.text+0xad5): undefined reference to `PdhCollectQueryData'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.4.rcgu.o):sysinfo.2ae7d728-c:(.text+0x153f): undefined reference to `CallNtPowerInformation'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.5.rcgu.o):sysinfo.2ae7d728-c:(.text+0x74c): undefined reference to `PdhRemoveCounter'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.5.rcgu.o):sysinfo.2ae7d728-c:(.text+0x771): undefined reference to `PdhCloseQuery'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.5.rcgu.o):sysinfo.2ae7d728-c:(.text+0xe1c): undefined reference to `PdhRemoveCounter'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.5.rcgu.o):sysinfo.2ae7d728-c:(.text+0xe3f): undefined reference to `PdhCloseQuery'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.5.rcgu.o):sysinfo.2ae7d728-c:(.text+0x1758): undefined reference to `GetPerformanceInfo'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.5.rcgu.o):sysinfo.2ae7d728-c:(.text+0x1c7b): undefined reference to `PdhCollectQueryData'
C:\rtools42\x86_64-w64-mingw32.static.po
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.5.rcgu.o):sysinfo.2ae7d728-c:(.text+0x1dcf): undefined reference to `PdhOpenQueryA'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.5.rcgu.o):sysinfo.2ae7d728-c:(.text+0x1eae): undefined reference to `PdhRemoveCounter'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.5.rcgu.o):sysinfo.2ae7d728-c:(.text+0x1ed1): undefined reference to `PdhCloseQuery'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.5.rcgu.o):sysinfo.2ae7d728-c:(.text+0x22b7): undefined reference to `GetPerformanceInfo'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.5.rcgu.o):sysinfo.2ae7d728-c:(.text+0x266d): undefined reference to `GetProcessMemoryInfo'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.5.rcgu.o):sysinfo.2ae7d728-c:(.text+0x2902): undefined reference to `NtQuerySystemInformation'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/libru
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.6.rcgu.o):sysinfo.2ae7d728-c:(.text+0xad): undefined reference to `CoUninitialize'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.6.rcgu.o):sysinfo.2ae7d728-c:(.text+0x384): undefined reference to `CoInitializeEx'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.6.rcgu.o):sysinfo.2ae7d728-c:(.text+0x3e9): undefined reference to `CoInitializeSecurity'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.6.rcgu.o):sysinfo.2ae7d728-c:(.text+0x447): undefined reference to `CoCreateInstance'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.6.rcgu.o):sysinfo.2ae7d728-c:(.text+0x541): undefined reference to `CoSetProxyBlanket'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-p
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.6.rcgu.o):sysinfo.2ae7d728-c:(.text+0x6f2): undefined reference to `CoInitializeEx'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.6.rcgu.o):sysinfo.2ae7d728-c:(.text+0x757): undefined reference to `CoInitializeSecurity'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.6.rcgu.o):sysinfo.2ae7d728-c:(.text+0x7b5): undefined reference to `CoCreateInstance'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.6.rcgu.o):sysinfo.2ae7d728-c:(.text+0x8af): undefined reference to `CoSetProxyBlanket'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.6.rcgu.o):
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.6.rcgu.o):sysinfo.2ae7d728-c:(.text+0xc78): undefined reference to `SysAllocString'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.6.rcgu.o):sysinfo.2ae7d728-c:(.text+0xcbe): undefined reference to `SysFreeString'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.6.rcgu.o):sysinfo.2ae7d728-c:(.text+0xd8b): undefined reference to `SysAllocString'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.6.rcgu.o):sysinfo.2ae7d728-c:(.text+0xd9a): undefined reference to `SysAllocString'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.6.rcgu.o):sysinfo.2ae7d728-c:(.text+0xdd6): undefined reference to `SysFreeString'
C
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.6.rcgu.o):sysinfo.2ae7d728-c:(.text+0xdde): undefined reference to `SysFreeString'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.6.rcgu.o):sysinfo.2ae7d728-c:(.text+0xf0b): undefined reference to `SysAllocString'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.6.rcgu.o):sysinfo.2ae7d728-c:(.text+0xf4d): undefined reference to `SysFreeString'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.6.rcgu.o):sysinfo.2ae7d728-c:(.text+0xf57): undefined reference to `VariantClear'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.6.rcgu.o):sysinfo.2ae7d72
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.6.rcgu.o):sysinfo.2ae7d728-c:(.text+0xf82): undefined reference to `SysAllocString'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.6.rcgu.o):sysinfo.2ae7d728-c:(.text+0xfb0): undefined reference to `SysFreeString'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.6.rcgu.o):sysinfo.2ae7d728-c:(.text+0xfba): undefined reference to `VariantClear'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.6.rcgu.o):sysinfo.2ae7d728-c:(.text+0x10dc): undefined reference to `CoUninitialize'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.7.rcgu.o):sysinfo.2ae7d728-c:(.text+0x6fa): undefined reference to `NetUserEnum'
C:\rtools42\x86_64-w64-mingw32.stati
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.7.rcgu.o):sysinfo.2ae7d728-c:(.text+0x7f5): undefined reference to `NetUserGetLocalGroups'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.7.rcgu.o):sysinfo.2ae7d728-c:(.text+0x82a): undefined reference to `NetApiBufferFree'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.7.rcgu.o):sysinfo.2ae7d728-c:(.text+0xaf9): undefined reference to `NetApiBufferFree'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.7.rcgu.o):sysinfo.2ae7d728-c:(.text+0xb2a): undefined reference to `LsaEnumerateLogonSessions'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.7.rcgu.o):sysinfo.2ae7d728-c:(.text+0xb95): undefined reference to `LsaGetLogonSessionData'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.7.rcgu.o):sysinfo.2ae7d728-c:(.text+0xdaa): undefined reference to `LsaFreeReturnBuffer'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.9.rcgu.o):sysinfo.2ae7d728-c:(.text+0xc83): undefined reference to `GetAdaptersAddresses'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.9.rcgu.o):sysinfo.2ae7d728-c:(.text+0xd4a): undefined reference to `GetAdaptersAddresses'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.9.rcgu.o):sysinfo.2ae7d728-c:(.text+0xd8b): undefined reference to `GetAdaptersAddresses'
C
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.11.rcgu.o):sysinfo.2ae7d728-c:(.text+0x7c1): undefined reference to `GetIfTable2'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.11.rcgu.o):sysinfo.2ae7d728-c:(.text+0x117d): undefined reference to `FreeMibTable'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ./rust/target/x86_64-pc-windows-gnu/release/librustUtils.a(sysinfo-d7211667ceae4265.sysinfo.2ae7d728-cgu.11.rcgu.o):sysinfo.2ae7d728-c:(.text+0x1477): undefined reference to `GetIfEntry2'
collect2.exe: error: ld returned 1 exit status
make: *** [C:/PROGRA~1/R/R-42~1.1/share/make/winshlib.mk:16: rustUtils.dll] Error 1
ERROR: compilation failed for package 'rustUtils'
─ removing 'C:/Users/jorda/AppData/Local/Temp/RtmpYHikEy/devtools_install_15e05bac5cdc/rustUtils'
Error in `(function (command = NULL, args = character(), error_on_status = TRUE, …`:
! System command 'Rcmd.exe' failed
---
Exit status: 1
stdout & stderr: <printed>
---
Type .Last.error to see the more details.
I was able to solve this by linking all the libraries these C functions come from by adding -lole32 -lntoskrnl -lpsapi -lpdh -lpowrprof -loleaut32 -lnetapi32 -lsecur32 -liphlpapi
to my Makevars.win.
Do I need to do something in the future so that these get linked by default?
Good that you solved the problem! It seems Polars requires these libraries.
Do I need to do something in the future so that these get linked by default?
Like this one, you might need to add extra libraries to PKG_LIBS
. As it's very much depends on what dependencies you use, I think there's no general advice here.
I have been following this guide: https://cran.r-project.org/web/packages/rextendr/vignettes/package.html to create an R package that calls Rust code. My Rust code runs fine in Rust and when called with
rust_source()
, but is failing when trying to create a package:Here is the .Last.error:
And here is my particularly long function and rust_source() arguments:
Is this guide up to date, or is there a better resource to follow for this procedure? Thanks a lot.