diff --git a/examples/main.c b/examples/main.c
index 21eb21e97c454942faba350c8692872a4f5f9429..87891ed14da81bd0e5e7cb76a5c8f41709a38666 100644
--- a/examples/main.c
+++ b/examples/main.c
@@ -306,7 +306,11 @@ int main(int argc, char *argv[]) {
         }
         break;
       case 'x':
+#ifdef HAVE_VELOCIRAPTOR
         with_structure_finding = 1;
+#else
+	error("Error: (-x) needs to have the code compiled with VELOCIraptor linked in.");
+#endif
         break;
       case 'y':
         if (sscanf(optarg, "%d", &dump_tasks) != 1) {
@@ -717,6 +721,11 @@ int main(int argc, char *argv[]) {
       error("Periodic self-gravity over MPI temporarily disabled.");
 #endif
 
+#if defined(WITH_MPI) && defined(HAVE_VELOCIRAPTOR)
+    if(with_structure_finding)
+      error("VEOCIraptor not yet enabled over MPI.");
+#endif
+
 #ifdef SWIFT_DEBUG_CHECKS
     /* Check once and for all that we don't have unwanted links */
     if (!with_stars && !dry_run) {