So far I've written all my code in visual studio and now I need to add some UI to it so I'm going to use Qt. So I added every file In my project (except main class) and then tried compiling it using Qt. since I've used some c++0x features I had to add this line to project file :
QMAKE_CXXFLAGS += -std=c++0x
then I tried compiling it. there are only two errors (there may be more but compiler stops on these two)
In file included from d:\qt\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/bits/postypes.h:42,
from d:\qt\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/iosfwd:42,
from d:\qt\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/ios:39,
from d:\qt\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/ostream:40,
from ../TranslatorBase/ttObject.h:5,
from ../TranslatorBase/ttArray.h:5,
from ../TranslatorBase/ttArray.cpp:1:
d:\qt\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/cwchar:159: error: '::swprintf' has not been declared
d:\qt\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/cwchar:166: error: '::vswprintf' has not been declared
I don't have any idea why there should be such an error. and to make sure I first tried to compile same project using cygwin/gcc using this command :
gcc -std=c++0x TranslatorBase/ttArray.cpp -c -o ttArray.o
there is no error there it compiles even without any warnings. In fact every file in my project compiles without any warnings there.
I'm now using Qt Creator v2.0.1 based on Qt v4.7.0 and it's using mingw/gcc v4.4.0
--edit--
just a new thing I've found, even without my source files (only with Qt generated files) there is still compilation error. it seems there is a problem with the gcc I've got.
@Troubadour Qt generated this command:
g++ -c -std=c++0x -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I'd:/Qt/qt/include/QtCore' -I'd:/Qt/qt/include/QtGui' -I'd:/Qt/qt/include' -I'd:/Qt/qt/include/ActiveQt' -I'debug' -I'.' -I'../TranslatorUI' -I'.' -I'd:/Qt/qt/mkspecs/win32-g++' -o debug/ttArray.o ../TranslatorBase/ttArray.cpp