From 9a00a8bd72a9e812abd2270a1d1e0844a88bf965 Mon Sep 17 00:00:00 2001 From: Colin Sherratt Date: Tue, 28 Jan 2014 02:15:09 -0500 Subject: [PATCH] fixed linker --- Makefile | 2 +- lib.rs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b127742..39f2983 100644 --- a/Makefile +++ b/Makefile @@ -15,4 +15,4 @@ libovr-rs-44316370-0.1.so: libovr_wrapper.a lib.rs rustc lib.rs -L . test: test.rs libovr-rs-44316370-0.1.so - rustc test.rs -L . --link-args="-lovr -ludev -lstdc++ -lc -lX11 -lm -lpthread -lXinerama" + rustc test.rs -L . diff --git a/lib.rs b/lib.rs index 2ac7a1c..7da6455 100644 --- a/lib.rs +++ b/lib.rs @@ -11,9 +11,11 @@ use cgmath::quaternion::Quat; use cgmath::vector::Vec3; use cgmath::matrix::Mat4; +#[cfg(target_os = "linux")] +#[link(name="udev")] +#[link(name="stdc++")] +#[link(name="Xinerama")] #[link(name="ovr_wrapper")] -extern {} - #[link(name="ovr")] extern {}