-
-
Notifications
You must be signed in to change notification settings - Fork 451
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
Can't compile for target x86_64-pc-windows-gnu (ld: cannot find -lntdll) #995
Comments
There is nothing in this crate that references Windows in any way. This seems like a general issue with your cross compilation toolchain or an upstream dependency. |
It seems tokio and parking_log references Windows libraries.
Maybe I should test these libraries alone as well and report the problem against them, in case one of them reproduces the problem. I'm trying to compile on native Windows, by the way, in order to rule out cross-compile problems. Of course later I might switch to cross compiling as it would be more convenient. |
All right, reproduced with |
I'm porting one of my Linux tools to Windows and it fails to compile when the
postgres
crate is added as a dependency. I opted for using targetx86_64-pc-windows-gnu
becausex86_64-pc-windows-msvc
would require me to install a large Visual Studio toolchain that I doubt I really need.Here is a minimal project to reproduce the issue:
Cargo.toml:
src/main.rs:
When I try to compile it, I get the following error:
So it can't link to
ntdll
, but I don't know why. I see thepostgres
crate depends onwinapi
andwindows-sys
, but if I try to directly use these crates, I can link tontdll
just fine, even withx86_64-w64-mingw32-gcc
, so it seemspostgres
has a special circumstance which prevents that.The text was updated successfully, but these errors were encountered: