Search code examples
c++qtosx-mountain-lionqwt

Error when installing Qwt 6.02 on OSX 10.8.3


After commands

qmake -spec macx-g++ 
make
make install

I'm getting

ld: library not found for -lqwt
collect2: ld returned 1 exit status
make[2]: *** [../../lib/qwtmathml.framework/qwtmathml] Error 1
make[1]: *** [sub-mathml-make_default] Error 2
make: *** [sub-textengines-make_default-ordered] Error 2

Any Idea what could be the problem?


Solution

  • Quick Answer: Edit qwtconfig.pri and comment out the second to the last line and rebuild:

    QWT_CONFIG += QwtFramework // Comment this line out
    

    Long Answer: Qwt on OS X trys to build itself as a Mac Framework by default. Besides the basic qwt library, there are a couple other internal items in the Qwt package that are also trying to build (examples, QwtMathML library). The QMake project file used by Qwt has a couple issues when it trys to build those final dependencies but it can't find the Qwt framework that it just built (if you look in lib directory, you should see that qwt.framework is actually built and there). The developer is aware of them but doesn't have an OS X machine on which try to fix them so he's dependent on someone submitting a fix.