-
Notifications
You must be signed in to change notification settings - Fork 123
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
std::rt::start_on_main_thread no longer exists? #62
Comments
It's a side effect of this change. rust-lang/rust#10965. Alex posted a potential work around. extern mod native;
extern mod green;
use std::task::TaskOpts;
#[start]
fn start(argc: int, argv: **u8) -> int {
do native::start(argc, argv) {
let mut pool = green::SchedPool::new(green::PoolConfig::new());
let (p, c) = Chan::new();
do pool.spawn(TaskOpts::new()) {
println!("green pool");
c.send(());
}
p.recv();
pool.shutdown();
}
} |
Is native ready to be used?
|
Compiling with rustc instead of rustpkg seems to work as a temporary work around. It looks like there is a bug in rustpkg. extern mod glfw;
extern mod native;
use std::libc;
#[link(name="glfw")]
extern {}
#[start]
fn start(argc: int, argv: **u8) -> int {
do native::start(argc, argv) {
main();
}
} This seems to give me a working window. |
I get a segfault. I've built glfw3 from master, glfw-rs from master (had to rename libglfw3.so to libglfw.so for linking to work), then compiled this:
|
Fixed in #65 |
I get the compile error
unresolved name
std::rt::start_on_main_thread
when trying to build any of the examples. I also looked in rust's repo under libstd/rt and couldn't find any instances of the function "start_on_main_thread".
The text was updated successfully, but these errors were encountered: