[Solved] KDChart crash on constructor.
-
Hi guys,
I just came across KDChart and I'm trying it's functionality.
I built the library (for windows) following the instructions and compiled an example, a very easy one:
@
#include <QApplication>
#include <KDChartWidget>int main( int argc, char** argv ) {
QApplication app( argc, argv );KDChart::Widget widget; //Crash here widget.resize( 600, 600 ); QVector< qreal > vec0, vec1, vec2; vec0 << -5 << -4 << -3 << -2 << -1 << 0 << 1 << 2 << 3 << 4 << 5; vec1 << 25 << 16 << 9 << 4 << 1 << 0 << 1 << 4 << 9 << 16 << 25; vec2 << -125 << -64 << -27 << -8 << -1 << 0 << 1 << 8 << 27 << 64 << 125; widget.setDataset( 0, vec0, "Linear" ); widget.setDataset( 1, vec1, "Quadratic" ); widget.setDataset( 2, vec2, "Cubic" ); widget.show(); return app.exec();
}
@Apparently it crashes, at runtime, when I try to instantiate the widget causing the main to return 1.
Any Idea what I did wrong?
Using Qt 4.8 on VS2010 and Windows 7Edit:
Ok, I'm just dumb, I forgot I compiled KD Chart for release and tried compiling the example as debug. That it's what caused the crash.
Leaving it here if somebody else is silly enough to run into my same problem