-
Notifications
You must be signed in to change notification settings - Fork 10
unresolved external symbol _round / _trunc #36
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
Comments
Could you try using modern link.exe and use |
Another way to try would be to figure out what the exports are called in that SDK version, and tell the linker to look for that alternate name, similar to
|
Sooo, MS only added many of the C99 math functions in VS2013: ldc-developers/ldc#822 (comment) Once cursed way of potentially getting it to work is to link to the Universal C Runtime as well:
It will only fall back to |
One problem will likely be that the UCRT relies on the symbol EDIT: Yeah...
I guess you could get around it by manually defining it on the rust side x) See https://github.com/huangqinjin/ucrt/blob/d6e817a4cc90f6f1fe54f8a0aa4af4fff0bb647d/inc/corecrt_internal_simd.h#L21 and https://github.com/huangqinjin/ucrt/blob/d6e817a4cc90f6f1fe54f8a0aa4af4fff0bb647d/inc/i386/cruntime.inc#L179 Could export the symbol yourself with the desired feature level: #[unsafe(no_mangle)] // #[no_mangle] in 1.76, iirc
#[used]
pub static __isa_available: c_int = 0; |
Thanks, already used the previous In my use case, it looks like floating-point is limited to configuring timeouts for The following seems to work: hostlinker.bat
.cargo/config.toml
build.rs
It requires:
This approach does not require any Visual Studio (not even the Community Edition). According to this, it should be theoretically possible to actually use an older version of |
Correct, WinXP in particular should be much more straightforward - you can compile against the modern-ish XP platform toolset (VS2017) and everything should just work there: https://learn.microsoft.com/en-us/cpp/build/configuring-programs-for-windows-xp |
I've added a section on this in the https://github.com/rust9x/rust/wiki/Limitations wiki entry - can't really do much about this otherwise! |
I tried this code:
(minimal example, added to
main
of rust9x-sample)I expected to see this happen:
it should still compile and link (
cargo +rust9x build --target i586-rust9x-windows-msvc
)Instead, this happened:
The issue also appears when program depends on crates
config
and/ortime
.Meta
rustc +rust9x --version --verbose
:rust9x-1.76-beta-v5 on Windows 10
Installation uses:
Unmodified sample compiled and linked correctly. Minimal
reqwest
example also successfully compiles, links and runs:the example from reqwest readme file
The text was updated successfully, but these errors were encountered: