Skip to content

Failed to compile some part of example from the website " rand::Rng().shuffle([1, 2, 3]) " #5053

Closed
@cnd

Description

@cnd

OS: Windows 7 32 bit, using MinGW version suggested by wiki (because last one just fails)

Trying to compile example from website.

description:

this code works:

use core::*;

fn main() {
    for ["Alice", "Bob", "Carol"].each |&name| {
        do task::spawn {
            io::println(name);
        }
    }
}

but when I add

let v = rand::Rng().shuffle([1, 2, 3]);

like

use core::*;

fn main() {
    for ["Alice", "Bob", "Carol"].each |&name| {
        do task::spawn {
            let v = rand::Rng().shuffle([1, 2, 3]);
            io::println(name);
        }
    }
}

it fails with error :

The procedure entry point ... rand... extension... not found in the .... dll

btw: why does rust code highlighting on github look like plain text?

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-windowsOperating system: Windows

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions