Ggez: Unable to run astroblasto example without adding nalgebra and rand as dependencies to cargo.toml

Created on 2 Aug 2019  路  4Comments  路  Source: ggez/ggez

Bug Description
Followed steps here: https://github.com/ggez/ggez/blob/master/docs/BuildingForEveryPlatform.md to run the astroblasto example game. Ran into two similar errors during compile:

Error 1:
error[E0432]: unresolved import 'nalgebra'
--> src/main.rs:13:5
|
13 | use nalgebra as na;
| ^^^^^^^^^^^^^^ no 'nalgebra' external crate

Error 2:
error[E0432]: unresolved import 'rand'
--> src/main.rs:14:5
|
14 | use rand;
| ^^^^ no 'rand' external crate

To Reproduce
Follow steps here: https://github.com/ggez/ggez/blob/master/docs/BuildingForEveryPlatform.md to run the astroblasto example game.

Expected behavior
Expected the program would compile and run, launching a window with an Asteroids-like game.

Hardware and Software:

  • ggez version: 0.5
  • OS: Manjaro 18.0 GNOME Edition
  • Graphics card: VMWare SVGA II Adapter
  • Running OS as a VIrtualBox VM
Type-DOCS bug

Most helpful comment

better fix is to change use nalgebra as na; to use ggez::use nalgebra as na;` no need to add nalgebra as a dependancy

All 4 comments

I was able to work around this issue by adding the following lines beneath the _[dependencies]_ section of the program's _cargo.toml_ file:
nalgebra = "0.18.0"
rand = "0.7.0"

Awesome, thank you! This is a doc bug.

better fix is to change use nalgebra as na; to use ggez::use nalgebra as na;` no need to add nalgebra as a dependancy

That's been done in commit c67ad14890ce6c55eb3bedca184bee8ab54692ae

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BezPowell picture BezPowell  路  3Comments

Manghi picture Manghi  路  3Comments

icefoxen picture icefoxen  路  4Comments

icefoxen picture icefoxen  路  5Comments

icefoxen picture icefoxen  路  4Comments