Skip to content

Cannot run any rust programs on windows #14403

Closed
@DarthShoge

Description

@DarthShoge

I was following the getting started https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust process and I had managed to write the simple hello world program and compiled it succesfully with mysys. the problem is that when i try to run it crashes instantly with ntdll.dll being at fault (note this is with g++ 4.8)
when i run with the recomended g++ version 4.5 it wont even comiple i end up getting this outputted

error: linking with `gcc` failed: exit code: 1
note: gcc '-m32' '-L' 'C:\Program Files (x86)\Rust\bin\rustlib\i686-pc-mingw32\lib' '-o' 'hello' 'hello.o' '-lmorestack' '-Wl,--gc-sections' '-shared-libgcc' '-Wl,--enable-long-section-names' 'C:\Program Files (x86)\Rust\bin\rustlib\i686-pc-mingw32\lib\libnative-1fb5e2c0-0.11.0-pre.rlib' 'C:\Program Files (x86)\Rust\bin\rustlib\i686-pc-mingw32\lib\libstd-59beb4f7-0.11.0-pre.rlib' 'C:\Program Files (x86)\Rust\bin\rustlib\i686-pc-mingw32\lib\liballoc-1085c790-0.11.0-pre.rlib' 'C:\Program Files (x86)\Rust\bin\rustlib\i686-pc-mingw32\lib\libcore-c5ed6fb4-0.11.0-pre.rlib' 'C:\Program Files (x86)\Rust\bin\rustlib\i686-pc-mingw32\lib\liblibc-4f9a876d-0.11.0-pre.rlib' '-L' 'C:\Users\Admin\rust\.rust' '-L' 'C:\Users\Admin\rust' '-Wl,-Bdynamic' '-lws2_32' '-lgcc_s' '-lcompiler-rt'
note: C:\Program Files (x86)\Rust\bin\rustlib\i686-pc-mingw32\lib\libstd-59beb4f7-0.11.0-pre.rlib(r-rustrt-rust_builtin.o): In function `gmtime':
c:/program files (x86)/mingw-builds/x32-4.8.1-win32-dwarf-rev5/mingw32/i686-w64-mingw32/include/time.h:240: undefined reference to `_gmtime32'
C:\Program Files (x86)\Rust\bin\rustlib\i686-pc-mingw32\lib\libstd-59beb4f7-0.11.0-pre.rlib(r-rustrt-rust_builtin.o): In function `localtime':
c:/program files (x86)/mingw-builds/x32-4.8.1-win32-dwarf-rev5/mingw32/i686-w64-mingw32/include/time.h:238: undefined reference to `_localtime32'
C:\Program Files (x86)\Rust\bin\rustlib\i686-pc-mingw32\lib\libstd-59beb4f7-0.11.0-pre.rlib(r-rustrt-rust_builtin.o): In function `mktime':
c:/program files (x86)/mingw-builds/x32-4.8.1-win32-dwarf-rev5/mingw32/i686-w64-mingw32/include/time.h:239: undefined reference to `_mktime32'
c:/program files (x86)/mingw-builds/x32-4.8.1-win32-dwarf-rev5/mingw32/i686-w64-mingw32/include/time.h:239: undefined reference to `_mktime32'
C:\Program Files (x86)\Rust\bin\rustlib\i686-pc-mingw32\lib\liballoc-1085c790-0.11.0-pre.rlib(r-jemalloc-stats.o):stats.c:(.text+0x2313): undefined reference to `__chkstk_ms'
C:\Program Files (x86)\Rust\bin\rustlib\i686-pc-mingw32\lib\liballoc-1085c790-0.11.0-pre.rlib(r-jemalloc-stats.o):stats.c:(.text+0x309f): undefined reference to `__chkstk_ms'
C:\Program Files (x86)\Rust\bin\rustlib\i686-pc-mingw32\lib\liballoc-1085c790-0.11.0-pre.rlib(r-jemalloc-util.o):util.c:(.text+0x2079): undefined reference to `__chkstk_ms'
C:\Program Files (x86)\Rust\bin\rustlib\i686-pc-mingw32\lib\liballoc-1085c790-0.11.0-pre.rlib(r-jemalloc-ctl.o):ctl.c:(.text+0x2945): undefined reference to `__chkstk_ms'
C:\Program Files (x86)\Rust\bin\rustlib\i686-pc-mingw32\lib\liballoc-1085c790-0.11.0-pre.rlib(r-jemalloc-ctl.o):ctl.c:(.text+0x493f): undefined reference to `__chkstk_ms'
C:\Program Files (x86)\Rust\bin\rustlib\i686-pc-mingw32\lib\liballoc-1085c790-0.11.0-pre.rlib(r-jemalloc-ctl.o):ctl.c:(.text+0x49d5): more undefined references to `__chkstk_ms' follow
collect2: ld returned 1 exit status

error: aborting due to previous error

Just to note I am running in Windows 7
any help would be much appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-windowsOperating system: Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions