Static compile of Qt Charts
What is the proper option for the command-line? I tried -qt-charts and -charts, but both are unknown options.
What version of Qt are you trying to build ?
Which option did you give to configure ?
Sorry, I'm doing a static build of Qt 5.8, and would like charts included.
/Users/jedd/qt5.8/src/qtbase/configure -top-level -qt-charts -no-opengl -no-fontconfig -release -qt-libpng -qt-zlib -qt-freetype -static -prefix /Users/jedd/Qt/5.8/static -confirm-license -opensource -nomake examples -no-xcb-xlib -qt-xcb -no-dbus -nomake tests -skip declarative -qt-xkbcommon
ERROR: Unknown command line option '-qt-charts'.
I'm currently working on OS X, will compile same for Linux,Windows.
-no-opengloption in the case of macOS ?
AFAIK, it's the other way around. you add
-skip module_nameto not build one.
BTW, running configure --help didn't show any qtchart options, nor did I find any references in qfeatures.txt
It's a module not an option like the SQL drivers.
So it's built by default? OK, let me check my installation.
OK, my static build is missing /lib/libQt5Charts_debug.a
Or that's what happens when I attempt a build of the piechart example/
make: *** No rule to make target
/Users/jedd/Qt/5.8/static/lib/libQt5Charts_debug.a', needed bypiechart.app/Contents/MacOS/piechart'. Stop.
piechart builds fine dynamically.
I'll look at compiling charts separately?
Yes you can build the module by hand.
If you did an out of source build, then just create the qtcharts folder there and use the classic combo of qmake/make/make install.
Got it. Compiled qtcharts and copied the .a file to my static 5.8, then added:
LIBS += -lQt5Charts
To my .pro file.
QT += chartsshould be enough in your .pro file
Great, thanks for your replies!