Closed jsanders closed 11 years ago
Weird. Sounds OSX specific, I'll have to take a peep on my Mac next time I'm at work. I've removed the call to sdl::start anyways
It should be using the #[no_main] attribute like sprocketnes does. On Sep 5, 2013 2:31 PM, "James Sanders" notifications@github.com wrote:
Simply removing the call to sdl::start in demo/video.rs allows the demo to be compiled, but then it fails when run:
$ ./demo/demo 2013-09-05 15:23:01.713 demo[54886:707] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error (1000) creating CGSWindow on line 259' * First throw call stack:() libc++abi.dylib: terminate called throwing an exception Abort trap: 6
I'm not sure this is a related or completely different problem.
— Reply to this email directly or view it on GitHubhttps://github.com/brson/rust-sdl/issues/93 .
Thanks! Now I'm getting a different error when making the demo:
$ make demos
rustc -L . demo/demo.rc -o demos
demo/video.rs:3:4: 3:11 warning: unused import [-W unused-imports (default)]
demo/video.rs:3 use std::rt;
^~~~~~~
error: linking with `cc` failed with code 1
note: cc arguments: -L/usr/local/rust-master/lib/rustc/x86_64-apple-darwin/lib -m64 -o demos demos.o -L/usr/local/rust-master/lib/rustc/x86_64-apple-darwin/lib -lstd-6c65cf4b443341b1-0.8-pre -L. -lsdl-95460b1b072257-0.3.0 -lSDL_image -lSDL_mixer -lSDL -lSDLmain -framework Foundation -framework AppKit -L. -L/Users/james/Code/rust-sdl/.rust -L/Users/james/Code/rust-sdl -Wl,-no_compact_unwind -lmorestack -lrustrt -Wl,-rpath,@executable_path/../../../../usr/local/rust-master/lib/rustc/x86_64-apple-darwin/lib -Wl,-rpath,@executable_path/. -Wl,-rpath,/usr/local/rust-master/lib/rustc/x86_64-apple-darwin/lib -Wl,-rpath,/Users/james/Code/rust-sdl/.
note: ld: warning: directory not found for option '-L/Users/james/Code/rust-sdl/.rust'
Undefined symbols for architecture x86_64:
"_SDL_main", referenced from:
-[SDLMain applicationDidFinishLaunching:] in libSDLmain.a(SDLMain.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: aborting due to previous error
make: *** [demos] Error 101
I'm compiling the current tip of rust master just in case, but that doesn't seem like the problem. Should I put this in a new issue?
Yes please. I'm getting the issue too, on OSX. I'll see what I can do on my lunch break.
Done: #96
Simply removing the call to
sdl::start
indemo/video.rs
allows the demo to be compiled, but then it fails when run:I'm not sure this is a related or completely different problem.