Skip to content
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

Cannot find sdl on OS X #15

Closed
palango opened this issue Oct 23, 2014 · 2 comments
Closed

Cannot find sdl on OS X #15

palango opened this issue Oct 23, 2014 · 2 comments

Comments

@palango
Copy link

palango commented Oct 23, 2014

I have a problem with getting the first tutorial compiled. I'm on a mac and installed sdl2 as stated from homebrew. However I get this error when compiling. Any idea how to solve this?

cargo build                                                                             2:06:29
   Compiling getting-started v0.0.0 (file:///Users/paul/Projects/rust/piston-test)
error: linking with `cc` failed: exit code: 1
note: cc '-m64' '-L' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib' '-o' '/Users/paul/Projects/rust/piston-test/target/getting-started' '/Users/paul/Projects/rust/piston-test/target/getting-started.o' '-Wl,-force_load,/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libmorestack.a' '-nodefaultlibs' '-fno-lto' '-Wl,-dead_strip' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libnative-4e7c5e5c.rlib' '/Users/paul/Projects/rust/piston-test/target/deps/libpiston-84163e5ca344ca3d.rlib' '/Users/paul/Projects/rust/piston-test/target/deps/libsprite-a466b0ed80d3339d.rlib' '/Users/paul/Projects/rust/piston-test/target/deps/libcam-690682aee8e5181f.rlib' '/Users/paul/Projects/rust/piston-test/target/deps/libsdl2_game_window-f4a015bf3a0bdf5c.rlib' '/Users/paul/Projects/rust/piston-test/target/deps/libuuid-56731db3b6427479.rlib' '/Users/paul/Projects/rust/piston-test/target/deps/libopengl_graphics-4350b0f7f800109a.rlib' '/Users/paul/Projects/rust/piston-test/target/deps/libshader_version-be2bb9fb7463fbbb.rlib' '/Users/paul/Projects/rust/piston-test/target/deps/libgl-bb78cdc3bae0f4e0.rlib' '/Users/paul/Projects/rust/piston-test/target/deps/libimage-f1911951e4fc0ac6.rlib' '/Users/paul/Projects/rust/piston-test/target/deps/libevent-037aa9aff5b1d4c8.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libtime-4e7c5e5c.rlib' '/Users/paul/Projects/rust/piston-test/target/deps/libinput-0f8d5acb58e11f21.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libserialize-4e7c5e5c.rlib' '/Users/paul/Projects/rust/piston-test/target/deps/libsdl2-cc0f4201ff9feba0.rlib' '/Users/paul/Projects/rust/piston-test/target/deps/libgenmesh-a18b660d2bef5904.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libflate-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liblog-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libregex-4e7c5e5c.rlib' '/Users/paul/Projects/rust/piston-test/target/deps/libgraphics-97cf825a272bee12.rlib' '/Users/paul/Projects/rust/piston-test/target/deps/libvecmath-cb72b1b0b9fb4b3e.rlib' '/Users/paul/Projects/rust/piston-test/target/deps/libnoise-49e079138a931886.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libstd-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/librand-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libsync-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/librustrt-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libcollections-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liballoc-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liblibc-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libunicode-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libcore-4e7c5e5c.rlib' '-L' '/Users/paul/Projects/rust/piston-test/target' '-L' '/Users/paul/Projects/rust/piston-test/target/deps' '-L' '/Users/paul/Projects/rust/piston-test/.rust' '-L' '/Users/paul/Projects/rust/piston-test' '-lSDL2' '-lSystem' '-lpthread' '-lc' '-lm' '-lcompiler-rt'
note: ld: warning: directory not found for option '-L/Users/paul/Projects/rust/piston-test/.rust'
ld: library not found for -lSDL2
clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: aborting due to previous error
Could not compile `getting-started`.

To learn more, run the command again with --verbose.
@bvssvni
Copy link
Member

bvssvni commented Oct 23, 2014

@palango Perhaps PistonDevelopers/rust-empty#175 would help?

@palango
Copy link
Author

palango commented Oct 23, 2014

That helped! Thanks.

@palango palango closed this as completed Oct 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants