../grathQWT/debug/libgrathQWT.a(mainwindow.o): In function `MainWindow':C:\MyProjects\grathQWT/../../Qt/2010.05/qt/include/QtCore/../../src/corelib/arch/qatomic_i386.h:125: multiple definition of `MainWindow::MainWindow(QWidget*)'debug/mainwindow.o:C:\MyProjects\fatigue/mainwindow.cpp:59: first defined here../grathQWT/debug/libgrathQWT.a(mainwindow.o): In function `MainWindow':C:\MyProjects\grathQWT/mainwindow.cpp:6: multiple definition of `MainWindow::MainWindow(QWidget*)'debug/mainwindow.o:C:\MyProjects\fatigue/mainwindow.cpp:59: first defined here../grathQWT/debug/libgrathQWT.a(mainwindow.o): In function `~MainWindow':C:\MyProjects\grathQWT/mainwindow.cpp:53: multiple definition of `MainWindow::~MainWindow()'debug/mainwindow.o:C:\MyProjects\fatigue/mainwindow.cpp:71: first defined here../grathQWT/debug/libgrathQWT.a(mainwindow.o):C:\MyProjects\grathQWT/mainwindow.cpp:56: multiple definition of `non-virtual thunk to MainWindow::~MainWindow()'debug/mainwindow.o:C:\MyProjects\fatigue/mainwindow.cpp:74: first defined here../grathQWT/debug/libgrathQWT.a(mainwindow.o): In function `~MainWindow':C:\MyProjects\grathQWT/mainwindow.cpp:53: multiple definition of `MainWindow::~MainWindow()'debug/mainwindow.o:C:\MyProjects\fatigue/mainwindow.cpp:71: first defined here../grathQWT/debug/libgrathQWT.a(mainwindow.o):C:\MyProjects\grathQWT/mainwindow.cpp:56: multiple definition of `non-virtual thunk to MainWindow::~MainWindow()'debug/mainwindow.o:C:\MyProjects\fatigue/mainwindow.cpp:74: first defined here../grathQWT/debug/libgrathQWT.a(mainwindow.o): In function `~MainWindow':C:\MyProjects\grathQWT/mainwindow.cpp:53: multiple definition of `MainWindow::~MainWindow()'debug/mainwindow.o:C:\MyProjects\fatigue/mainwindow.cpp:71: first defined herecollect2: ld returned 1 exit status
#include <QtGui/QApplication>#include "dialog.h"int main(int argc, char *argv[]){ QApplication a(argc, argv); //Dialog w; //w.show(); MainWindow Window; const int N = 13; int n; int numberCurve; double x[N+1]={1,2,3,6,8,9,11,12,13,14,18,21,22}; //double x[N+1]={-10,-7,-6,-5,-4, -2,-1,0, 2,3,6,9,10}; double y[N+1]; double x2[N+1]; double y2[N+1]; double AxisXmax = 0; double AxisXmin = 0; double AxisYmax = 0; double AxisYmin = 0; double errorX; for(int k = 0; k < N; k++ ) { y[k]=exp(x[k]); //первый график x2[k]= x[k]+ 2; y2[k]=x2[k]*x[k] + 3 * x2[k]; //exp(x2[k]); //второй график //определяем минимум макимум х и у if(x[k] > AxisXmax) AxisXmax = x[k]; if(x[k] < AxisXmin) AxisXmin = x[k]; if(y[k] < AxisYmin) AxisYmin = y[k]; if(y[k] > AxisYmax) AxisYmax = y[k]; if(x[k] < 0 ) errorX = x[k]; } numberCurve = 1; n = Window.plot_first (AxisXmax,AxisXmin,AxisYmax,AxisYmin,errorX,x,y,N,numberCurve); //вызов моей библиотечной функции // if( n == 0 ) // { // numberCurve++; // for(int k=0; k < N; k++) // { // x[k]=x2[k]; // y[k]=y2[k]; // } // n = plot_next(x,y,N,numberCurve); // } Window.show (); return a.exec();}
class MainWindow : public QMainWindow
class MainWindow : public QMainWindow{ Q_OBJECT