compiler and app error with qtcreator 2.3 and 4..7.4
I've recently update my QtCreator and Qt installation to 2.3 and 4.7.4 respectively. However, ever since I upgraded I can't compile or run my older programs (exit with code: 1073741511). When I compile I get the following error:
Code:
In file included from d:\__dev\qt\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/bits/postypes.h:42,
from d:\__dev\qt\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/bits/char_traits.h:42,
from d:\__dev\qt\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/string:42,
from d:\__dev\Qt\QtSDK\Desktop\Qt\4.7.4\mingw\include/QtCore/qstring.h:60,
from d:\__dev\Qt\QtSDK\Desktop\Qt\4.7.4\mingw\include/QtCore/qobject.h:48,
from d:\__dev\Qt\QtSDK\Desktop\Qt\4.7.4\mingw\include/QtCore/qcoreapplication.h:45,
from d:\__dev\Qt\QtSDK\Desktop\Qt\4.7.4\mingw\include/QtGui/qapplication.h:45,
from d
:\__dev\Qt\QtSDK\Desktop\Qt\4.7.4\mingw\include
/QtGui
/QApplication:1,
from ..\apache-gui\main.cpp:1:
d:\__dev\qt\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/cwchar:159: error: '::swprintf' has not been declared
d:\__dev\qt\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/cwchar:166: error: '::vswprintf' has not been declared
mingw32-make[1]: Leaving directory `C:/Users/creatio/Desktop/work/C++/apache-gui/apache-gui-build-desktop'
mingw32-make[1]: *** [debug/main.o] Error 1
mingw32-make: *** [debug] Error 2
The process "D:\__dev\Qt\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2.
Re: compiler and app error with qtcreator 2.3 and 4..7.4
As far as I see, this page may have a solution to you:
http://stackoverflow.com/questions/6...-been-declared
Re: compiler and app error with qtcreator 2.3 and 4..7.4
Thanks, it set me in the right direction. I ended up just building Qt from source instead of the SDK libraries. The problem I'm having right now is that the application has the QWindowsStyle. It doesn't automatically set it to QWindowsVistaStyle. I've tried setting it with QApplication::setStyle(new QWindowsVistaStyle), but it gives me the QWindowsVistaStyle in undefined error.
Code:
#include <QtGui/QApplication>
#include <QWindowsVistaStyle>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
MainWindow w;
w.show();
return a.exec();
}