Closed safetypins closed 8 years ago
I got the same error, I had to re-install qt5 from homebrew with the -static
flag set, and then it got a little further, now its complaining about:
glmap.cpp:454:33: error: use of undeclared identifier 'floor'
scale = qMin(width, height) / floor(zoom);
The way to fix the glmap.cpp issue is to add an include for cmath. I also had to make some tweaks to the TerraFirma.pro file to get it to compile under El Capitan.
I have the application so that it compiles and runs, but it's not working. I get a grey screen with no graphics whatsoever. Feel free to see my forked repository, and look in the "mjarvis-osx-fixes" branch.
diff --git a/glmap.cpp b/glmap.cpp
index f8c789e..603c79e 100644
--- a/glmap.cpp
+++ b/glmap.cpp
@@ -12,6 +12,7 @@
#include <QSettings>
#include <QSurfaceFormat>
#include "./uvrules.h"
+#include <cmath>
/*
* Drawing order:
Here's my full diff of what I've changed so far. Note that you will need to install to /usr/local instead of /usr, because of System Integrity Protection in OS X El Capitan. That's generally a best practice for Linux as well, IMHO. I also had to tell qmake to add the c++11 flag.
diff --git a/Terrafirma.pro b/Terrafirma.pro
index 4e7e238..169e2b5 100644
--- a/Terrafirma.pro
+++ b/Terrafirma.pro
@@ -1,4 +1,5 @@
QT += core gui
+CONFIG += c++11
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
@@ -86,9 +87,9 @@ RESOURCES += \
DISTFILES +=
-desktopfile.path = /usr/share/applications
+desktopfile.path = /usr/local/share/applications
desktopfile.files = terrafirma.desktop
-pixmapfile.path = /usr/share/pixmaps
+pixmapfile.path = /usr/local/share/pixmaps
pixmapfile.files = terrafirma.png
-target.path = /usr/bin
+target.path = /usr/local/bin
INSTALLS += desktopfile pixmapfile target
diff --git a/glmap.cpp b/glmap.cpp
index f8c789e..603c79e 100644
--- a/glmap.cpp
+++ b/glmap.cpp
@@ -12,6 +12,7 @@
#include <QSettings>
#include <QSurfaceFormat>
#include "./uvrules.h"
+#include <cmath>
/*
* Drawing order:
All changes have been merged.. and I went ahead and made a binary for El Capitan, it's on the website.
So, I originally had an issue running the qmake command, but after the inclusion of the icns file, that error has been resolved, and it is now replaced by:
So, as I said in the title, I installed qmake via homebrew instead of the recommended way of compiling it myself. Can you tell from this error message if that is the problem?