You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expected the extern block to work the same in main.rs and lib.rs, but dumpbin shows that in the non-working code GetStdHandle is imported from kernel32.dll.dll:
Microsoft (R) COFF/PE Dumper Version 14.37.32822.0
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file .\issue.exe
File Type: EXECUTABLE IMAGE
Section contains the following imports:
kernel32.dll.dll
14001C298 Import Address Table
140024070 Import Name Table
0 time date stamp
0 Index of first forwarder reference
0 GetStdHandle
I tried this code:
lib.rs
main.rs
I expected to see this happen:
main.rs
usinglib.rs
should compile and run without any issues.Instead, this happened:
The following code works correctly:
main.rs
I expected the extern block to work the same in main.rs and lib.rs, but dumpbin shows that in the non-working code
GetStdHandle
is imported fromkernel32.dll.dll
:rustc --version --verbose
:The text was updated successfully, but these errors were encountered: