Do something like this
<pre>
#ifdef ALEX_DEBUG
static void print_matrix(const Mat& x) { ... }
#else
static void print_matrix(const Mat& /*x*/) {}
#endif
</pre>