3

I'm using the image crate and Visual Studio with Rust plugin. The code is like this:

extern crate image;

When I use the command line cargo build, everything was fine. With the Visual Studio build I get

src\main.rs(4,1): error : found staticlib `image` instead of rlib or dylib
help: please recompile this crate using --crate-type lib

How can I use the crate in Visual Studio?

Shepmaster
  • 388,571
  • 95
  • 1,107
  • 1,366
bitnick
  • 1,903
  • 3
  • 16
  • 22
  • Troubleshooting: try passing the verbose flag to cargo on both the command line and in VS's invocation, and see what differences there are between the outputs. – Will Fischer Sep 27 '15 at 17:36
  • I found the answer at https://github.com/PistonDevelopers/VisualRust/issues the Visual Rust plugin does not support cargo now,it just run the rustc when you compile – bitnick Sep 28 '15 at 00:24

0 Answers0