--- a/src/hugin1/hugin/LayoutRemapper.cpp
+++ b/src/hugin1/hugin/LayoutRemapper.cpp
@@ -20,6 +20,11 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  */
+
+#ifdef __WXMAC__
+#include "panoinc_WX.h"
+#include "panoinc.h"
+#endif
 
 #include <cmath>