diff --git a/build.rs b/build.rs
deleted file mode 100644
index 9c41947..0000000
--- a/build.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-fn main() {
-    // Must enable rcon on Windows
-    #[cfg(all(windows, not(feature = "rcon")))]
-    {
-        println!("cargo:warning=lazymc: you must enable rcon feature on Windows");
-    }
-}
diff --git a/src/main.rs b/src/main.rs
index fb93f8a..d74da90 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -31,6 +31,10 @@ use std::env;
 
 use clap::App;
 
+// Compile time feature compatability check.
+#[cfg(all(windows, not(feature = "rcon")))]
+compile_error!("Must enable \"rcon\" feature on Windows.");
+
 /// Default log level if none is set.
 const LOG_DEFAULT: &str = "info";