This? https://github.com/mozilla/rust/issues/9055

Windows APIs use stdcall, which implies all apis are decorated as
"_SetLastError@16", while cdecl APIs are decorated as "_SetLastError".
Our rustc is wrong so it generates llvm IR with wrong calling convention.
And when gcc prints linke error, it removes the first underscore so
you get "SetLastError" undefined. It's kinda confusing :(



On Sat, Sep 14, 2013 at 6:21 AM, Corey Richardson <[email protected]> wrote:
> Hi all,
>
> I've hit a wall with rustdoc_ng. It fails to build on Windows with
> http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/1435/steps/compile/logs/stdio,
> the error being:
>
> note: 
> i686-pc-mingw32\stage1\bin\rustc\i686-pc-mingw32\bin\lib.o:fake:(.text+0x68373):
> undefined reference to `SetLastError'
>
> I find this very strange that it manifests in rustdoc_ng. The only
> reason I could see it failing is that it would need to link to
> libstd's dependencies (kernel32 in this case).
>
> Does anyone know what's going on here?
> _______________________________________________
> Rust-dev mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/rust-dev
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to