Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

试了下,运行不了 #1

Open
xicheng opened this issue Sep 18, 2017 · 3 comments
Open

试了下,运行不了 #1

xicheng opened this issue Sep 18, 2017 · 3 comments

Comments

@xicheng
Copy link

xicheng commented Sep 18, 2017

开发电脑是win7 x64

编译成功,放xp上面就不是有效的win32.

然后试了下,
cargo build --target i686-pc-windows-msvc
编译不过。

@lynnux
Copy link
Owner

lynnux commented Oct 30, 2019

@xicheng 试试0.2版本,另外vs编译命令是cargo rustc -- -C link-args="/subsystem:console,5.01" 吗?

@longyn
Copy link

longyn commented Nov 30, 2019

Windows 10 64 位, 32, 64toolchain 都有

  • 编译32程序不行
  • 编译64程序
cargo rustc --release -- -C link-args="/subsystem:console,5.01" --target i686-pc-windows-msvc
   Compiling format_print v0.1.0 (D:\project\rust\21_format_print)
error[E0461]: couldn't find crate `xpsupport` with expected target triple i686-pc-windows-msvc
 --> src\main.rs:1:1
  |
1 | extern crate xpsupport;
  | ^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: the following crate versions were found:
          crate `xpsupport`, target triple x86_64-pc-windows-msvc: \\?\D:\project\rust\21_format_print\target\release\deps\libxpsupport-34b04cbc09296eef.rlib

error: aborting due to previous error

error: could not compile `format_print`.

To learn more, run the command again with --verbose.

@longyn
Copy link

longyn commented Nov 30, 2019

成功了,需要把default toolchain改成32位, 然后运行编译命令, 指定target貌似不行

  • Default toolchain 改成32位
rustup default  stable-i686-pc-windows-msvc
  • 运行编译命令
cargo rustc --release -- -C link-args="/subsystem:console,5.01"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants