Keep getting linker errors


#1

I used rust fine for the first week or so, but when I got to the socket part of the second edition book, I started getting linker errors. (error: linking with link.exe failed: exit code: 1120).

I have no stray link.exe in my path since calling link.exe from the command line doesn’t run anything.
It seems to be calling MSVC, which is weird considering I’ve read that rust comes bundled with the required MinGW stuff.

I’m on the latest nightly and each time I do cargo build I get this output:

error: linking with link.exe failed: exit code: 1120
|
= note: “C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\link.exe” “/NOLOGO” “/NXCOMPAT” “/LIBPATH:C:\Users\frede\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\x86_64-
pc-windows-msvc\lib” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.__rustc_fallback_codegen_unit.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.alloc-allocator.rcgu.o” “C:\rustProj
ects\http_server\target\debug\deps\http_server-52a61e18284f0863.alloc-allocator.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.alloc-arc.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\dep
s\http_server-52a61e18284f0863.alloc-boxed.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.alloc-heap.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.alloc-heap.volati
le.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.alloc-raw_vec.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.alloc-raw_vec.volatile.rcgu.o” “C:\rustProjects\http_server\t
arget\debug\deps\http_server-52a61e18284f0863.alloc-slice.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.alloc-string.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f086
3.alloc-vec.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.core-any.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.core-cell.volatile.rcgu.o” “C:\rustProjec
ts\http_server\target\debug\deps\http_server-52a61e18284f0863.core-cmp-impls.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.core-cmp-impls.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http
server-52a61e18284f0863.core-cmp.volatile.rcgu.o" “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.core-convert.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.core-fmt.rcgu.o”
“C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.core-fmt.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.core-mem.volatile.rcgu.o” “C:\rustProjects\http_server\target\debu
g\deps\http_server-52a61e18284f0863.core-nonzero.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.core-num.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.core-ops-ran
ge.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.core-option.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.core-ptr.rcgu.o” “C:\rustProjects\http_server
\target\debug\deps\http_server-52a61e18284f0863.core-ptr.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.core-result.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18
284f0863.core-slice.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.core-str.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.core-sync-atomic.rcgu.o” “C:\rustProjects
\http_server\target\debug\deps\http_server-52a61e18284f0863.core-sync-atomic.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.http_server.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_ser
ver-52a61e18284f0863.http_server.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.std-ffi-c_str.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.std-fs.rcgu.o” “C:\rustP
rojects\http_server\target\debug\deps\http_server-52a61e18284f0863.std-fs.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.std-io.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a
61e18284f0863.std-io-error.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.std-io-error.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.std-io.volatile.rcgu.o” “C:\rus
tProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.std-net-addr.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.std-net-tcp.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\ht
tp_server-52a61e18284f0863.std-net-tcp.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.std-net.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.std-panicking.vo
latile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.std-path.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.std-sync-mpsc-blocking.rcgu.o” “C:\rustProjects\http_s
erver\target\debug\deps\http_server-52a61e18284f0863.std-sync-mpsc-cache_aligned.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.std-sync-mpsc-mpsc_queue.volatile.rcgu.o” “C:\rustProjects\http_server\tar
get\debug\deps\http_server-52a61e18284f0863.std-sync-mpsc-oneshot.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.std-sync-mpsc-shared.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\ht
tp_server-52a61e18284f0863.std-sync-mpsc-spsc_queue.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.std-sync-mpsc-stream.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e1
8284f0863.std-sync-mpsc-sync.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.std-sync-mpsc.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.std-sync-mutex.volat
ile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.std-sys_common-mutex.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.std-sys_common-poison.rcgu.o” “C:\rustProjects\http_se
rver\target\debug\deps\http_server-52a61e18284f0863.std-sys_common-poison.volatile.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.std-thread.rcgu.o” “C:\rustProjects\http_server\target\debug\deps\http_server-
52a61e18284f0863.std-time-duration.rcgu.o” “/OUT:C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.exe” “C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.crate.allocator.rcgu.o” “/OPT:REF,NOICF” “/D
EBUG” “/NATVIS:C:\Users\frede\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\etc\liballoc.natvis” “/NATVIS:C:\Users\frede\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\etc\libcore.natvis” “/LIBPATH:C:\rustProjec
ts\http_server\target\debug\deps” “/LIBPATH:C:\Users\frede\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib” “C:\rustProjects\http_server\target\debug\deps\libhttp_server-785594bc2df03a87.rlib” “C:\Use
rs\frede\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libstd-2c20a7e9383f3de0.rlib” "C:\Users\frede\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libpanic

unwind-740d2dfd5928fd77.rlib” “C:\Users\frede\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libunwind-9f6833dad96b42a9.rlib” “C:\Users\frede\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustli
b\x86_64-pc-windows-msvc\lib\liblibc-097f78db9c94eb95.rlib” “C:\Users\frede\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\liballoc_system-363f15f83d34739f.rlib” “C:\Users\frede\.rustup\toolchains\nigh
tly-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\liballoc-a89808d9a3de8180.rlib” “C:\Users\frede\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libstd_unicode-0123fe5688e4e606.rlib” “C:\
Users\frede\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libcore-d0440a7784420d31.rlib” “C:\Users\frede\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libco
mpiler_builtins-174585bcd70c7fa8.rlib” “advapi32.lib” “ws2_32.lib” “userenv.lib” “shell32.lib” “msvcrt.lib”
= note: http_server-52a61e18284f0863.__rustc_fallback_codegen_unit.rcgu.o : error LNK2019: unresolved external symbol _ZN3std4sync4mpsc9SendError17h0a11346bc3137587E referenced in function _ZN4core3ops8function6FnOnce9call_once17h79e3c1fc714d8e8cE
http_server-52a61e18284f0863.__rustc_fallback_codegen_unit.rcgu.o : error LNK2019: unresolved external symbol ZN66$LT$alloc…arc…Arc$LT$T$GT$$u20$as$u20$core…ops…drop…Drop$GT$4drop17h5b507417fa2dbbd3E referenced in function _ZN4core3ptr13drop_in
_place17h00a9e42f9d3eaf4dE
http_server-52a61e18284f0863.__rustc_fallback_codegen_unit.rcgu.o : error LNK2019: unresolved external symbol ZN74$LT$std…sync…mpsc…Sender$LT$T$GT$$u20$as$u20$core…ops…drop…Drop$GT$4drop17h53da5b3e8e04071dE referenced in function _ZN4core3ptr1
3drop_in_place17h12f98ccaf511097eE
http_server-52a61e18284f0863.__rustc_fallback_codegen_unit.rcgu.o : error LNK2019: unresolved external symbol ZN82$LT$std…sync…mpsc…stream…Packet$LT$T$GT$$u20$as$u20$core…ops…drop…Drop$GT$4drop17h4a99f58e409dfe6eE referenced in function _ZN4c
ore3ptr13drop_in_place17h15d5ede0f5a63328E
http_server-52a61e18284f0863.__rustc_fallback_codegen_unit.rcgu.o : error LNK2019: unresolved external symbol ZN85$LT$std…sync…mpsc…mpsc_queue…Queue$LT$T$GT$$u20$as$u20$core…ops…drop…Drop$GT$4drop17h7c2f57e6066d6940E referenced in function _Z
N4core3ptr13drop_in_place17h25bfaa59ef5e48e4E
http_server-52a61e18284f0863.__rustc_fallback_codegen_unit.rcgu.o : error LNK2019: unresolved external symbol _ZN5alloc4heap8box_free17h40eb867f109483f9E referenced in function _ZN4core3ptr13drop_in_place17h2979a726ed60f8eeE
http_server-52a61e18284f0863.__rustc_fallback_codegen_unit.rcgu.o : error LNK2019: unresolved external symbol _ZN5alloc4heap8box_free17h0aea67709401b4e7E referenced in function _ZN4core3ptr13drop_in_place17h2bc2196171b31f47E
http_server-52a61e18284f0863.__rustc_fallback_codegen_unit.rcgu.o : error LNK2019: unresolved external symbol ZN82$LT$alloc…raw_vec…RawVec$LT$T$C$$u20$A$GT$$u20$as$u20$core…ops…drop…Drop$GT$4drop17hb26a2515ac79e13aE referenced in function _ZN4c
ore3ptr13drop_in_place17h4922975f4bf01f1aE
http_server-52a61e18284f0863.__rustc_fallback_codegen_unit.rcgu.o : error LNK2019: unresolved external symbol ZN66$LT$alloc…arc…Arc$LT$T$GT$$u20$as$u20$core…ops…drop…Drop$GT$4drop17h6214c34f971edef1E referenced in function _ZN4core3ptr13drop_in
_place17h497d773d73ec331eE
http_server-52a61e18284f0863.__rustc_fallback_codegen_unit.rcgu.o : error LNK2019: unresolved external symbol ZN74$LT$std…sync…mutex…Mutex$LT$T$GT$$u20$as$u20$core…ops…drop…Drop$GT$4drop17h0ae0eb910bdf11b7E referenced in function _ZN4core3ptr1
3drop_in_place17h579b9518eda24a38E
http_server-52a61e18284f0863.__rustc_fallback_codegen_unit.rcgu.o : error LNK2019: unresolved external symbol ZN82$LT$std…sync…mpsc…shared…Packet$LT$T$GT$$u20$as$u20$core…ops…drop…Drop$GT$4drop17h944a6e98dcd9ac1eE referenced in function _ZN4c
ore3ptr13drop_in_place17h7911c7f3c5682751E
http_server-52a61e18284f0863.__rustc_fallback_codegen_unit.rcgu.o : error LNK2019: unresolved external symbol ZN83$LT$std…sync…mpsc…oneshot…Packet$LT$T$GT$$u20$as$u20$core…ops…drop…Drop$GT$4drop17h50c28cd242ac887cE referenced in function _ZN4
core3ptr13drop_in_place17h934e598bc372aa39E
http_server-52a61e18284f0863.__rustc_fallback_codegen_unit.rcgu.o : error LNK2019: unresolved external symbol ZN76$LT$std…sync…mpsc…Receiver$LT$T$GT$$u20$as$u20$core…ops…drop…Drop$GT$4drop17h38738a1189aec131E referenced in function _ZN4core3pt
r13drop_in_place17ha33b767313e36693E
http_server-52a61e18284f0863.__rustc_fallback_codegen_unit.rcgu.o : error LNK2019: unresolved external symbol ZN93$LT$std…sync…mutex…MutexGuard$LT$$u27$a$C$$u20$T$GT$$u20$as$u20$core…ops…drop…Drop$GT$4drop17h53e888d99ab0ea27E referenced in fun
ction _ZN4core3ptr13drop_in_place17hc34459369e470551E
http_server-52a61e18284f0863.__rustc_fallback_codegen_unit.rcgu.o : error LNK2019: unresolved external symbol ZN133$LT$std…sync…mpsc…spsc_queue…Queue$LT$T$C$$u20$ProducerAddition$C$$u20$ConsumerAddition$GT$$u20$as$u20$core…ops…drop…Drop$GT$4d
rop17h93ce7a98f520d0b3E referenced in function _ZN4core3ptr13drop_in_place17hd2753886f69c0954E
http_server-52a61e18284f0863.__rustc_fallback_codegen_unit.rcgu.o : error LNK2019: unresolved external symbol ZN80$LT$std…sync…mpsc…sync…Packet$LT$T$GT$$u20$as$u20$core…ops…drop…Drop$GT$4drop17hb52d739e391066e5E referenced in function _ZN4cor
e3ptr13drop_in_place17hd4647e12ed87d9dbE
http_server-52a61e18284f0863.__rustc_fallback_codegen_unit.rcgu.o : error LNK2019: unresolved external symbol ZN66$LT$alloc…arc…Arc$LT$T$GT$$u20$as$u20$core…ops…drop…Drop$GT$4drop17h827be674381523cfE referenced in function _ZN4core3ptr13drop_in
_place17he5ddfaf1444f7bf0E
http_server-52a61e18284f0863.__rustc_fallback_codegen_unit.rcgu.o : error LNK2019: unresolved external symbol ZN66$LT$alloc…arc…Arc$LT$T$GT$$u20$as$u20$core…ops…drop…Drop$GT$4drop17h0b977b195dd47558E referenced in function _ZN4core3ptr13drop_in
_place17hff6e522d5f2451caE
http_server-52a61e18284f0863.alloc-arc.volatile.rcgu.o : error LNK2019: unresolved external symbol _ZN4core3ptr13drop_in_place17hb931e98243e2d439E referenced in function ZN33$LT$alloc…arc…Arc$LT$T$GT$$GT$3new17h8fa10d79cc8e6ce7E
http_server-52a61e18284f0863.alloc-arc.volatile.rcgu.o : error LNK2019: unresolved external symbol _ZN4core3ptr13drop_in_place17h3ed085012e6a1c93E referenced in function ZN33$LT$alloc…arc…Arc$LT$T$GT$$GT$9drop_slow17h2a3920e09b576d13E
http_server-52a61e18284f0863.alloc-arc.volatile.rcgu.o : error LNK2019: unresolved external symbol _ZN4core3ptr13drop_in_place17h58aff4c0ffaf19f6E referenced in function ZN33$LT$alloc…arc…Arc$LT$T$GT$$GT$9drop_slow17h40f6caa29ba4a8d5E
http_server-52a61e18284f0863.alloc-arc.volatile.rcgu.o : error LNK2019: unresolved external symbol _ZN4core3ptr13drop_in_place17h3a936749ac296b7dE referenced in function ZN33$LT$alloc…arc…Arc$LT$T$GT$$GT$9drop_slow17hc135956ab65aa17aE
http_server-52a61e18284f0863.alloc-vec.volatile.rcgu.o : error LNK2019: unresolved external symbol ZN40$LT$alloc…raw_vec…RawVec$LT$T$GT$$GT$3new17h07635098d0d4166bE referenced in function ZN33$LT$alloc…vec…Vec$LT$T$GT$$GT$3new17had81ee2bf2fec5
ddE
http_server-52a61e18284f0863.alloc-vec.volatile.rcgu.o : error LNK2019: unresolved external symbol ZN49$LT$alloc…raw_vec…RawVec$LT$T$C$$u20$A$GT$$GT$3ptr17h5792415831f192aeE referenced in function ZN71$LT$alloc…vec…Vec$LT$T$GT$$u20$as$u20$core
…ops…deref…DerefMut$GT$9deref_mut17h063148dcd2e45a3dE
http_server-52a61e18284f0863.alloc-vec.volatile.rcgu.o : error LNK2019: unresolved external symbol ZN4core3ptr31$LT$impl$u20$$BP$mut$u20$T$GT$7is_null17h88e959b473617937E referenced in function ZN71$LT$alloc…vec…Vec$LT$T$GT$$u20$as$u20$core…ops
…deref…DerefMut$GT$9deref_mut17h063148dcd2e45a3dE
http_server-52a61e18284f0863.alloc-vec.volatile.rcgu.o : error LNK2019: unresolved external symbol _ZN4core5slice18from_raw_parts_mut17h9c45819c9b0d32f8E referenced in function ZN71$LT$alloc…vec…Vec$LT$T$GT$$u20$as$u20$core…ops…deref…DerefMut$G
T$9deref_mut17h063148dcd2e45a3dE
http_server-52a61e18284f0863.core-mem.volatile.rcgu.o : error LNK2019: unresolved external symbol _ZN4core3ptr13drop_in_place17h9ce82971b91ae675E referenced in function _ZN4core3mem4drop17hceda1d33e017a715E
http_server-52a61e18284f0863.std-sync-mpsc-sync.volatile.rcgu.o : error LNK2001: unresolved external symbol _ZN4core3ptr13drop_in_place17h9ce82971b91ae675E
http_server-52a61e18284f0863.core-mem.volatile.rcgu.o : error LNK2019: unresolved external symbol _ZN4core3ptr13drop_in_place17hbf08dc34ac0eb17fE referenced in function “?dtor$2@?0?_ZN4core3mem7replace17h1fbe545d95d91d95E@4HA” (?dtor$2@?0?_ZN4core3mem
7replace17h1fbe545d95d91d95E@4HA)
http_server-52a61e18284f0863.std-sync-mpsc-spsc_queue.volatile.rcgu.o : error LNK2001: unresolved external symbol _ZN4core3ptr13drop_in_place17hbf08dc34ac0eb17fE
http_server-52a61e18284f0863.std-sync-mpsc-stream.volatile.rcgu.o : error LNK2001: unresolved external symbol _ZN4core3ptr13drop_in_place17hbf08dc34ac0eb17fE
http_server-52a61e18284f0863.core-mem.volatile.rcgu.o : error LNK2019: unresolved external symbol _ZN4core3ptr13drop_in_place17hef554349d8790664E referenced in function “?dtor$2@?0?_ZN4core3mem7replace17h96f5b3654a414d76E@4HA” (?dtor$2@?0?_ZN4core3mem
7replace17h96f5b3654a414d76E@4HA)
http_server-52a61e18284f0863.core-option.volatile.rcgu.o : error LNK2001: unresolved external symbol _ZN4core3ptr13drop_in_place17hef554349d8790664E
http_server-52a61e18284f0863.std-sync-mpsc-mpsc_queue.volatile.rcgu.o : error LNK2001: unresolved external symbol _ZN4core3ptr13drop_in_place17hef554349d8790664E
http_server-52a61e18284f0863.core-mem.volatile.rcgu.o : error LNK2019: unresolved external symbol _ZN4core3ptr13drop_in_place17h66efc0393e011eeaE referenced in function “?dtor$2@?0?_ZN4core3mem7replace17heb6bf503058c8c71E@4HA” (?dtor$2@?0?_ZN4core3mem
7replace17heb6bf503058c8c71E@4HA)
http_server-52a61e18284f0863.std-sync-mpsc-sync.volatile.rcgu.o : error LNK2001: unresolved external symbol _ZN4core3ptr13drop_in_place17h66efc0393e011eeaE
http_server-52a61e18284f0863.core-ptr.volatile.rcgu.o : error LNK2019: unresolved external symbol _ZN4core3ptr13drop_in_place17h5072d639c8900c58E referenced in function “?dtor$2@?0?_ZN4core3ptr7replace17h20a94e06acb6d2d3E@4HA” (?dtor$2@?0?_ZN4core3ptr
7replace17h20a94e06acb6d2d3E@4HA)
http_server-52a61e18284f0863.std-sync-mpsc-oneshot.volatile.rcgu.o : error LNK2001: unresolved external symbol _ZN4core3ptr13drop_in_place17h5072d639c8900c58E
http_server-52a61e18284f0863.core-result.volatile.rcgu.o : error LNK2019: unresolved external symbol ZN82$LT$std…sys_common…poison…PoisonError$LT$T$GT$$u20$as$u20$core…fmt…Debug$GT$3fmt17hfe2ed4e547ef2567E referenced in function _ZN4core6result
13unwrap_failed17h3e8b6475f93a3452E
http_server-52a61e18284f0863.core-result.volatile.rcgu.o : error LNK2019: unresolved external symbol _ZN4core3fmt10ArgumentV13new17ha358efecd674939eE referenced in function _ZN4core6result13unwrap_failed17h3e8b6475f93a3452E
http_server-52a61e18284f0863.core-result.volatile.rcgu.o : error LNK2019: unresolved external symbol ZN72$LT$std…sync…mpsc…SendError$LT$T$GT$$u20$as$u20$core…fmt…Debug$GT$3fmt17h732e9ced608452c1E referenced in function _ZN4core6result13unwrap_f
ailed17hd5b7efed7c62e6a9E
http_server-52a61e18284f0863.core-result.volatile.rcgu.o : error LNK2019: unresolved external symbol _ZN4core3fmt10ArgumentV13new17hfcae9ab7698f79b6E referenced in function _ZN4core6result13unwrap_failed17hd5b7efed7c62e6a9E
http_server-52a61e18284f0863.http_server.volatile.rcgu.o : error LNK2019: unresolved external symbol ZN41$LT$std…sync…mpsc…Sender$LT$T$GT$$GT$4send17hf5be287667bcbe2aE referenced in function _ZN11http_server10ThreadPool7execute17h881fc23f67a74697
E
http_server-52a61e18284f0863.std-sync-mpsc-mpsc_queue.volatile.rcgu.o : error LNK2019: unresolved external symbol _ZN4core3ptr13drop_in_place17hfc9af589c0e63479E referenced in function ZN52$LT$std…sync…mpsc…mpsc_queue…Queue$LT$T$GT$$GT$3pop17h79
fc42b2979c5424E
http_server-52a61e18284f0863.std-sync-mpsc.volatile.rcgu.o : error LNK2001: unresolved external symbol _ZN4core3ptr13drop_in_place17hcb2618b41c11e910E
http_server-52a61e18284f0863.std-sync-mpsc-mpsc_queue.volatile.rcgu.o : error LNK2001: unresolved external symbol _ZN4core3ptr13drop_in_place17hcb2618b41c11e910E
http_server-52a61e18284f0863.std-sync-mpsc-oneshot.volatile.rcgu.o : error LNK2001: unresolved external symbol _ZN4core3ptr13drop_in_place17hcb2618b41c11e910E
http_server-52a61e18284f0863.std-sync-mpsc-shared.volatile.rcgu.o : error LNK2001: unresolved external symbol _ZN4core3ptr13drop_in_place17hcb2618b41c11e910E
http_server-52a61e18284f0863.std-sync-mpsc-stream.volatile.rcgu.o : error LNK2001: unresolved external symbol _ZN4core3ptr13drop_in_place17hcb2618b41c11e910E
http_server-52a61e18284f0863.std-sync-mpsc-oneshot.volatile.rcgu.o : error LNK2019: unresolved external symbol _ZN4core3ptr13drop_in_place17h503717047aca23b8E referenced in function ZN50$LT$std…sync…mpsc…oneshot…Packet$LT$T$GT$$GT$7upgrade17h3f3
68a4be572424bE
http_server-52a61e18284f0863.std-sync-mpsc.volatile.rcgu.o : error LNK2001: unresolved external symbol _ZN4core3ptr13drop_in_place17h503717047aca23b8E
http_server-52a61e18284f0863.std-sync-mpsc-shared.volatile.rcgu.o : error LNK2019: unresolved external symbol _ZN4core3ptr13drop_in_place17h4961f54cac255592E referenced in function ZN49$LT$std…sync…mpsc…shared…Packet$LT$T$GT$$GT$4send17h836106f2
7d4dc57eE
http_server-52a61e18284f0863.std-sync-mpsc-spsc_queue.volatile.rcgu.o : error LNK2019: unresolved external symbol _ZN4core3ptr13drop_in_place17h1f75726668179575E referenced in function ZN100$LT$std…sync…mpsc…spsc_queue…Queue$LT$T$C$$u20$Producer
Addition$C$$u20$ConsumerAddition$GT$$GT$3pop17h97d4b0030e502162E
http_server-52a61e18284f0863.std-sync-mpsc-spsc_queue.volatile.rcgu.o : error LNK2019: unresolved external symbol _ZN4core3ptr13drop_in_place17h469102997446abe9E referenced in function ZN100$LT$std…sync…mpsc…spsc_queue…Queue$LT$T$C$$u20$Producer
Addition$C$$u20$ConsumerAddition$GT$$GT$4push17h76d473e7cf3191f2E
http_server-52a61e18284f0863.std-sync-mpsc-sync.volatile.rcgu.o : error LNK2019: unresolved external symbol ZN47$LT$core…result…Result$LT$T$C$$u20$E$GT$$GT$6unwrap17he82f751b08367270E referenced in function ZN47$LT$std…sync…mpsc…sync…Packet$
LT$T$GT$$GT$9drop_port17h9ef74b2354fc49ffE
http_server-52a61e18284f0863.std-sync-mpsc-sync.volatile.rcgu.o : error LNK2019: unresolved external symbol ZN33$LT$alloc…vec…Vec$LT$T$GT$$GT$3new17h6bc03796f6ed4004E referenced in function ZN47$LT$std…sync…mpsc…sync…Packet$LT$T$GT$$GT$9drop
_port17h9ef74b2354fc49ffE
http_server-52a61e18284f0863.std-sync-mpsc.volatile.rcgu.o : error LNK2019: unresolved external symbol ZN47$LT$core…result…Result$LT$T$C$$u20$E$GT$$GT$7map_err17h1dcb08a2ac96fa2dE referenced in function ZN41$LT$std…sync…mpsc…Sender$LT$T$GT$$G
T$4send17hdffbd59d5240560eE
http_server-52a61e18284f0863.std-sync-mpsc.volatile.rcgu.o : error LNK2019: unresolved external symbol ZN47$LT$core…result…Result$LT$T$C$$u20$E$GT$$GT$2ok17hf9fbd84bbb1f9bd2E referenced in function ZN41$LT$std…sync…mpsc…Sender$LT$T$GT$$GT$4se
nd17hdffbd59d5240560eE
http_server-52a61e18284f0863.std-sync-mpsc.volatile.rcgu.o : error LNK2019: unresolved external symbol _ZN4core3ptr13drop_in_place17h6bc61e38261b919cE referenced in function ZN41$LT$std…sync…mpsc…Sender$LT$T$GT$$GT$4send17hdffbd59d5240560eE
http_server-52a61e18284f0863.std-sync-mpsc.volatile.rcgu.o : error LNK2019: unresolved external symbol _ZN4core3ptr13drop_in_place17h1e0288ee6c568b3bE referenced in function “?dtor$63@?0?ZN41$LT$std…sync…mpsc…Sender$LT$T$GT$$GT$4send17hdffbd59d52
40560eE@4HA” (?dtor$63@?0?ZN41$LT$std…sync…mpsc…Sender$LT$T$GT$$GT$4send17hdffbd59d5240560eE@4HA)
http_server-52a61e18284f0863.std-sync-mpsc.volatile.rcgu.o : error LNK2019: unresolved external symbol _ZN4core3ptr13drop_in_place17h09339ca77ddc425dE referenced in function “?dtor$64@?0?ZN41$LT$std…sync…mpsc…Sender$LT$T$GT$$GT$4send17hdffbd59d52
40560eE@4HA” (?dtor$64@?0?ZN41$LT$std…sync…mpsc…Sender$LT$T$GT$$GT$4send17hdffbd59d5240560eE@4HA)
C:\rustProjects\http_server\target\debug\deps\http_server-52a61e18284f0863.exe : fatal error LNK1120: 49 unresolved externals


#2

Are you using incremental compilation (i.e. set CARGO_INCREMENTAL=1) on nightly?

At work I was using nightly for a while to take advantage of incremental compilation (a full compile is usually 10+ minutes) but found that sometimes incremental compilation will result in incorrect symbols and a bunch of “unresolved external symbol” errors. A cargo clean whenever it happened was usually enough to fix the issue, but that defeated the entire reason I was using nightly.