Skip to content

Instantly share code, notes, and snippets.

@urbanij
Created October 25, 2020 09:18
Show Gist options
  • Save urbanij/989feab5ce83014730a6853d23ede2ee to your computer and use it in GitHub Desktop.
Save urbanij/989feab5ce83014730a6853d23ede2ee to your computer and use it in GitHub Desktop.
Install and use qwt under macOS

Install and use qwt under macOS*:

After downloading it from here https://sourceforge.net/projects/qwt/:

cd qwt-6.1.5
mkdir build && cd build
qmake ..
make -j4
sudo make install    # this command install stuff inside /usr/local/

then go build one of the example to make sure it's working. E.g.:

cd examples/bode

make sure the file bode.pro looks like something like this: (I've added the first line and the QT += printsupport)

include( /usr/local/qwt-6.1.5/features/qwt.prf ) # includes QWT libary into Project

TARGET       = bode

QT += printsupport

HEADERS = \
    mainwindow.h \
    plot.h \
    complexnumber.h \ 
    pixmaps.h

SOURCES = \
    plot.cpp \
    mainwindow.cpp \
    main.cpp

then copy the folder qwt.framework to the folder /Library/Frameworks/:

sudo cp -r /usr/local/qwt-6.1.5/lib/qwt.framework /Library/Frameworks/

otherwise you'd get this error when running the program: dyld: Library not loaded: qwt.framework/Versions/6/qwt.

Now you cant actually build the example:

mkdir build && cd build
qmake ..
make -j4

and run it:

./bode.app/Contents/MacOS/bode

Sun 25 Oct 2020 10:13:30 CET

* Tested on macOS Mojave 10.14.6. Assuming your version or qwt is 6.1.5 otherwise change it accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment