Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linker error with 32bit toolchain i686-pc-windows-msvc #1

Open
njeisecke opened this issue Jan 31, 2022 · 0 comments
Open

Linker error with 32bit toolchain i686-pc-windows-msvc #1

njeisecke opened this issue Jan 31, 2022 · 0 comments

Comments

@njeisecke
Copy link

Hi,

I'm trying to build the netifs-cli example using the 32bit MSVC toolchain:

cargo run --target i686-pc-windows-msvc

This results in a linker error:

error LNK2019: Verweis auf nicht aufgel\x94stes externes Symbol "__imp__GetAdaptersAddresses" in Funktion "__ZN6netifs8platform14get_interfaces17hf501d1d8a44b5e38E"

Complete error:

= note: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX64\\x86\\link.exe" "/NOLOGO" "/LARGEADDRESSAWARE" "/SAFESEH" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\netifs_cli.1uas6cav66jua03p.rcgu.o" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\netifs_cli.1vmgl70soce5hy14.rcgu.o" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\netifs_cli.26b3acn6uep2d6i2.rcgu.o" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\netifs_cli.2bfj6o6pfr4eis0m.rcgu.o" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\netifs_cli.2jh2qgyn5kepjpqt.rcgu.o" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\netifs_cli.2u17u3kgettqlk3f.rcgu.o" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\netifs_cli.3xvsuabmuchxawdm.rcgu.o" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\netifs_cli.420f89rj20acb3ai.rcgu.o" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\netifs_cli.43ffxe60hsf6ir5c.rcgu.o" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\netifs_cli.48z2ni9j7313xij.rcgu.o" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\netifs_cli.4fagnf9n1vbl935b.rcgu.o" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\netifs_cli.4rbczmlrxjsuftf.rcgu.o" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\netifs_cli.4uhp6novid0hykj8.rcgu.o" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\netifs_cli.57p33h81388hrjsy.rcgu.o" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\netifs_cli.5a3pz4le66vru4g.rcgu.o" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\netifs_cli.5bpn0hd8mgfa0o06.rcgu.o" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\netifs_cli.99q84sg4fcy267b.rcgu.o" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\netifs_cli.twab0bqqtd76j01.rcgu.o" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\netifs_cli.zo6mhkeb48dhskg.rcgu.o" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\netifs_cli.n1e2mgvhi77vhn9.rcgu.o" "/LIBPATH:C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps" "/LIBPATH:C:\\projects\\rust\\netifs-rs\\target\\debug\\deps" "/LIBPATH:C:\\Users\\njeiseck\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\libnetifs-9940fe10b02c76e0.rlib" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\libwidestring-b996b68b5a0355cc.rlib" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\libwinapi-4e01af5466259da9.rlib" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\libipnetwork-f0f5dcf8688e3643.rlib" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\libserde-9659c76e855bf9bb.rlib" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\libeui48-11a87970a8c10458.rlib" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\librustc_serialize-c25c4a60d528dd03.rlib" "C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\liblibc-f7d3ff740da9c072.rlib" "C:\\Users\\njeiseck\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libstd-41d48f5938a7bd14.rlib" "C:\\Users\\njeiseck\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libpanic_unwind-f11118e1c6bc62eb.rlib" "C:\\Users\\njeiseck\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libstd_detect-360f086b54439482.rlib" "C:\\Users\\njeiseck\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\librustc_demangle-6838f848788233b0.rlib" "C:\\Users\\njeiseck\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libhashbrown-c2f168e4d78a26ba.rlib" "C:\\Users\\njeiseck\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\librustc_std_workspace_alloc-5df62944db71f1fb.rlib" "C:\\Users\\njeiseck\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libunwind-84817bf87affd089.rlib" "C:\\Users\\njeiseck\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libcfg_if-a9902f027a385dfc.rlib" "C:\\Users\\njeiseck\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\liblibc-319324581b37bd0d.rlib" "C:\\Users\\njeiseck\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\liballoc-cc9fd5b30b9278be.rlib" "C:\\Users\\njeiseck\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\librustc_std_workspace_core-a0b1ff36c88e051c.rlib" "C:\\Users\\njeiseck\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libcore-805775f27cdf2fa1.rlib" "C:\\Users\\njeiseck\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib\\libcompiler_builtins-71b82e2e84020712.rlib" "Iphlpapi.lib" "kernel32.lib" "kernel32.lib" "ws2_32.lib" "bcrypt.lib" "advapi32.lib" "userenv.lib" "kernel32.lib" "msvcrt.lib" "/NXCOMPAT" "/LIBPATH:C:\\Users\\njeiseck\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\i686-pc-windows-msvc\\lib" "/OUT:C:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\netifs_cli.exe" "/OPT:REF,NOICF" "/DEBUG" "/NATVIS:C:\\Users\\njeiseck\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:C:\\Users\\njeiseck\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:C:\\Users\\njeiseck\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libcore.natvis" "/NATVIS:C:\\Users\\njeiseck\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libstd.natvis"
= note: Non-UTF-8 output: libnetifs-9940fe10b02c76e0.rlib(netifs-9940fe10b02c76e0.1lpvvf27lfscaskc.rcgu.o) : error LNK2019: Verweis auf nicht aufgel\x94stes externes Symbol \"__imp__GetAdaptersAddresses\" in Funktion \"__ZN6netifs8platform14get_interfaces17hf501d1d8a44b5e38E\".\r\nC:\\projects\\rust\\netifs-rs\\target\\i686-pc-windows-msvc\\debug\\deps\\netifs_cli.exe : fatal error LNK1120: 1 nicht aufgel\x94ste Externe\r\n

"Iphlpapi.lib" is included as a library as requested by the link attribute and of course it does contain the missing symbol.

I'm clueless. Does anybody have any idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant