brson / rust-sdl

SDL bindings for Rust
MIT License
179 stars 52 forks source link

cannot link against rust-sdl #69

Closed rossmurray closed 11 years ago

rossmurray commented 11 years ago

No code can link to Rust-SDL. Even the demo doesn't work correctly.

ross@ubuntu:~/Downloads/rust-sdl$ make demos
rustc -L . demo/demo.rc -o demos
error: linking with `cc` failed with code 1
note: cc arguments: -L/usr/local/lib/rustc/i686-unknown-linux-gnu/lib -m32 -o demos demos.o -L/usr/local/lib/rustc/i686-unknown-linux-gnu/lib -lstd-6c65cf4b443341b1-0.7 -L. -lsdl-95460b1b072257-0.3.0 -lrustrt -lrt -lpthread -lSDL_image -lSDL_mixer -lSDL -L. -lrt -ldl -lm -lmorestack -lrustrt -Wl,-rpath,$ORIGIN/../../../../usr/local/lib/rustc/i686-unknown-linux-gnu/lib -Wl,-rpath,$ORIGIN/. -Wl,-rpath,/usr/local/lib/rustc/i686-unknown-linux-gnu/lib -Wl,-rpath,/home/ross/Downloads/rust-sdl/.
note: demos.o: In function `video::main::anon::expr_fn_3673':
demos.rc:(.text+0x13b): undefined reference to `sdl::init::_4b172b18e7d8114b::_030'
demos.rc:(.text+0x980): undefined reference to `sdl::quit::_722cebd03df97be::_030'
collect2: ld returned 1 exit status

error: aborting due to previous error
make: *** [demos] Error 101

This is because in src/sdl.rc it says "mod sdl" instead of "pub mod sdl"

AngryLawyer commented 11 years ago

Should be alright now.