I spent the evening trying to build Qt3.3.8 on OSX so I could compile
CDPWizard for someone. Had to fiddle about a bit to get it to build.
Here is what I did in the end (note that you need xcode and gdal
installed*):
../configure -system-zlib -qt-gif -qt-libpng -no-debug -no-exceptions -
fast -prefix /usr/local/Trolltech/qt-mac-free-3.3.8
export QTDIR=/usr/local/Trolltech/qt-mac-free-3.3.8
export PATH=$QTDIR/bin:$PATH
export DYLD_LIBRARY_PATH=$QTDIR/lib
sudo make install
At this point build halted with this message:
dyld: Library not loaded: libqt.3.dylib
Referenced from: /usr/local/Trolltech/Qt-3.3.8/bin/uic
Reason: image not found
So I did this:
sudo install_name_tool -change libqt.3.dylib /usr/local/Trolltech/qt-
mac-free-3.3.8/lib/libqt.3.dylib /Users/tim/dev/cpp/qt-mac-free-3.3.8/
bin/uic
Then ran make install again:
sudo make install
That seems to have done the trick….now I’ll go on to build CDP Wizard:
svn co https://svn.qgis.org/repos/qgis/trunk/external_plugins/cdp_wizard
cd cdp_wizard
Change line 39 of cdpwizard.cpp to read:
#include “cdpwizardbase.h”
Add the following two lines to cdp_wizard.pro after the closing } on
line 20 (ie. these will be lines 21 and 22):
21 macx: INCLUDEPATH += /Library/Frameworks/GDAL.framework/
Headers/
22 macx: LIBS += -L/Library/Frameworks/GDAL.framework/unix/lib
Now create the makefiles:
qmake
Now compile:
make
If you get no errors (I got some warnings which can be ignored for
now) you can try to run the application:
../cdp_wizard.app/Contents/MacOS/cdp_wizard
The application should start up.
* Download William Kyngesburye’s excellent all in one frameworks
installer that includes proj, gdal, sqlite3 etc
http://www.kyngchaos.com/files/software/unixport/AllFrameworks.dmg