Receiving LNK1120 Linking Issue ONLY when attempting to include a local crate?

I have separated my project into three crates:

feed-forward
mnist_data
main

When I attempt to

use feed_forward::perceptron::*;

in my parent main.rs file, I receive this error (I know it’s this specific statement in particular since it compiles and runs completely fine when I comment out the use statement, even if it’s completely unused in the main.rs file):

= note: libfeed_forward-91895a3937a5cb25.rlib(feed_forward-91895a3937a5cb25.4d5wjsid97q4jz3w.rcgu.o) : error LNK2019: unresolved external symbol cblas_ddot referenced in function _ZN7ndarray6linalg11impl_linalg110_$LT$impl$u20$ndarray..ArrayBase$LT$S$C$ndarray..dimension..dim..Dim$LT$$u5b$usize$u3b$$u20$1$u5d$$GT$$GT$$GT$8dot_impl17hc13566f916e454e7E libfeed_forward-91895a3937a5cb25.rlib(feed_forward-91895a3937a5cb25.4d5wjsid97q4jz3w.rcgu.o) : error LNK2019: unresolved external symbol cblas_sdot referenced in function _ZN7ndarray6linalg11impl_linalg110_$LT$impl$u20$ndarray..ArrayBase$LT$S$C$ndarray..dimension..dim..Dim$LT$$u5b$usize$u3b$$u20$1$u5d$$GT$$GT$$GT$8dot_impl17hc13566f916e454e7E C:ProgrammingRustProjectsRustMLtargetdebugdepsRustML.exe : fatal error LNK1120: 2 unresolved externals

When I attempt to run the feed-forward crate’s main.rs, it builds completely fine.

From this error message, it seems it can’t locate some ndarray function?

Here is an image of my directory structure and main cargo.toml illustrate the situation:

image of directory structure with explanation

parent cargo.toml:

workspace = { members = ["feed-forward", "mnist_data"] }
[package]
name = "RustML"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]

ndarray = "0.15.6"
ndarray-stats = "0.5.1"
ndarray-linalg = "0.16.0"
mnist = "0.6.0"
mnist_data = { path = "mnist_data" }
feed-forward = { path = "feed-forward" }

rustup -Vv output:

> rustup -Vv
rustup 1.26.0 (5af9b9484 2023-04-05)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.75.0 (82e1608df 2023-12-21)`

rustup show output:

> rustup show
Default host: x86_64-pc-windows-msvc
rustup home:  C:Users|||.rustup

installed toolchains
--------------------

stable-x86_64-pc-windows-gnu
stable-x86_64-pc-windows-msvc (default)
nightly-2020-05-14-x86_64-pc-windows-msvc

installed targets for active toolchain
--------------------------------------

wasm32-unknown-unknown
x86_64-pc-windows-msvc

active toolchain
----------------

stable-x86_64-pc-windows-msvc (default)
rustc 1.75.0 (82e1608df 2023-12-21)

I have tried using the gnu toolchain instead but it doesn’t compile so that went out the window immediately.

For your convenience, here is a no-push, frozen, READ-ONLY branch of my repository, beware that the mnist_data crate downloads the MNIST data set (~12MB) from a Google drive and unzips the contents into a /data/ directory, so obviously don’t run code you don’t trust, but you shouldn’t even need to run it; building it causes the same problem.

https://github.com/ew9170/RustML/tree/stack_overflow_freeze


Things I have attempted:

Running cargo clean, deleting the /target directory, deleting the entire directory and cloning the repository from scratch

trying the different permutations of cargo.toml dependency orders:

ndarray = "0.15.6"
ndarray-stats = "0.5.1"
ndarray-linalg = "0.16.0"
mnist = "0.6.0"
mnist_data = { path = "mnist_data" }
feed-forward = { path = "feed-forward" }
mnist_data = { path = "mnist_data" }
feed-forward = { path = "feed-forward" }
ndarray = "0.15.6"
ndarray-stats = "0.5.1"
ndarray-linalg = "0.16.0"
mnist = "0.6.0"
feed-forward = { path = "feed-forward" }
mnist_data = { path = "mnist_data" }
ndarray = "0.15.6"
ndarray-stats = "0.5.1"
ndarray-linalg = "0.16.0"
mnist = "0.6.0"

I have also tried changing my use statement order (both before and after any ndarray use statements)

At this point I’m out of ideas, any help would be appreciated.

New contributor

EatonWu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật