New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

result::get() causes "Entry Point Not Found" on Windows #4320

Closed
mrhandle opened this Issue Jan 1, 2013 · 3 comments

Comments

Projects
None yet
3 participants
@mrhandle

mrhandle commented Jan 1, 2013

Configuration: Using Rust 0.5, Dec 21 2012 Windows release [.exe] on Windows 7
Problem: Having result::get in the code somehow generates a binary that has missing/invalid entry point. Below is the content of the error box in Windows 7 (tip: you can copy error dialogs in Windows with Ctrl+C).

---------------------------
try1.exe - Entry Point Not Found
---------------------------
The procedure entry point _ZN4repr14__extensions__9meth_519610visit_bool15_af4de08865eac43_05E could not be located in the dynamic link library core-c3ca5d77d81b46c1-0.5.dll. 
---------------------------
OK   
---------------------------

The code that causes the issue:

/** Pause the program before exit
 */
fn pause() {
    io::println("Press enter to continue...");

    let reader = io::stdin() as io::ReaderUtil;
    reader.read_line();
}

fn main() {
    // Handle the arguments
    let args = os::args();

    if args.len() != 2 {
        io::println("Error: give only the dictionary file!");
        pause();
        os::set_exit_status(1);
        return;
    }

    // Print the dictionary
    let path = path::Path(args[1]);
    let res = io::file_reader(&path);
    let reader = result::get(&res); // <---- THE PROBLEM LINE

    while !reader.eof() {
        io::println((reader as io::ReaderUtil).read_line());
    }

    io::println("DONE!");
    pause();
}

Thanks for all your hard work, and happy new year 🎉

@mrhandle

This comment has been minimized.

Show comment
Hide comment
@mrhandle

mrhandle Jan 1, 2013

This code works fine in Linux

mrhandle commented Jan 1, 2013

This code works fine in Linux

@Dretch

This comment has been minimized.

Show comment
Hide comment
@Dretch

Dretch Jan 2, 2013

Contributor

This looks similar to #3660.

As I understand it rust doesn't work very well on windows yet.

Contributor

Dretch commented Jan 2, 2013

This looks similar to #3660.

As I understand it rust doesn't work very well on windows yet.

@pnkfelix

This comment has been minimized.

Show comment
Hide comment
@pnkfelix

pnkfelix Mar 25, 2013

Member

closing as dupe of #3660.

Member

pnkfelix commented Mar 25, 2013

closing as dupe of #3660.

@pnkfelix pnkfelix closed this Mar 25, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment