Unsolved Error writing to invalid argument
-
Hii iam getting the following error while building the just sample project. i found solutions like
i) shadow build
ii)create debug and release foler
iii) remove \ after the lat cpp or .h file in .protried all those but no result.
is there any solution for this? please help me -
@Jyothi Do you really get this when you build the projects? If so then please post the whole compiler output including the very first warning/error.
Also, what Qt version and compiler do you use? -
Hi,
yes usually i will get this error. But every time i will uninstall and install the QT again. But this is not always the correct solution. i just need a permanent solution for this. Please help me to solve this.compiler output:
-
Fix your main.cpp - the compiler tells you where you made an error so fix it.
-
hi, nothing written in man.cpp. its just a sample qt deafult cpp file only
-
@Jyothi
Have a read of https://stackoverflow.com/questions/42873311/error-writing-to-invalid-argument to see if anything there is your situation. -
Then the error is in mainwindow.h and the compiler can only give a follow-up error because you miss a
)
in there. -
-
@Jyothi
Then you should look at yourmainwindow.h
as suggested by @Christian-Ehrlicher. If you choose to post it here, please paste the text from the file, not a screenshot. -
Hi,
this is my mainwindow.h file
#ifndef MAINWINDOW_H
#define MAINWINDOW_H#include <QMainWindow>
namespace Ui {
class MainWindow;
}class MainWindow : public QMainWindow
{
Q_OBJECTpublic:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();private:
Ui::MainWindow *ui;
};#endif // MAINWINDOW_H
-
@Jyothi
I cannot see anything wrong there.I really expected something from that stackoverflow post I referred you to to be at issue, but you say not. You might want to paste your
.pro
file because of one of the tips there?Otherwise I can only suggest you start a fresh project in a fresh directory. Do not even define your own
MainWindow
. Start with just aQWidget
or aQMainWindow
. In fact, you could change your existing program to use aQMainWindow
instead ofMainWindow
, and#include <QMainWindow>
in place of#include "mainwindow.h"
. Does that work? Then build back up to what you have now.