PDA

View Full Version : QtSingleApplication in Windows with release mode



Auryn
28th July 2009, 12:04
I use QtSingleApplication in my application.
It works good on Linux.
In Windows it works in debug mode, but in release mode compilation I get errors about QVector:



g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DNDEBUG -DQT_NO_DEBUG_OUTPUT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\Qt\2009.03\qt\include\QtCore" -I"..\..\Qt\2009.03\qt\include\QtNetwork" -I"..\..\Qt\2009.03\qt\include\QtGui" -I"..\..\Qt\2009.03\qt\include" -I"." -I"qtsingleapplication" -I"..\..\Qt\2009.03\qt\include\ActiveQt" -I"release" -I"." -I"..\..\Qt\2009.03\qt\mkspecs\win32-g++" -o release\qtlocalpeer.o qtsingleapplication\qtlocalpeer.cpp
In file included from C:/Qt/2009.03/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/vector:71,
from ../../Qt/2009.03/qt/include/QtCore/../../src/corelib/tools/qvector.h:52,
from ../../Qt/2009.03/qt/include/QtCore/qvector.h:1,
from ../../Qt/2009.03/qt/include/QtCore/QVector:1,
from qtsingleapplication\qtlockedfile.h:52,
from qtsingleapplication\qtlocalpeer.h:53,
from qtsingleapplication\qtlocalpeer.cpp:48:
C:/Qt/2009.03/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_vector.h:140: error: `allocator' has not been declared
C:/Qt/2009.03/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_vector.h:140: error: expected `>' before '<' token
C:/Qt/2009.03/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_vector.h:140: error: expected unqualified-id before '>' token
C:/Qt/2009.03/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_vector.h:876: error: expected `,' or `...' before '<' token
C:/Qt/2009.03/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_vector.h:877: error: `bool QtLP_Private::std::operator==(int)' must have an argument of class or enumerated type
C:/Qt/2009.03/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_vector.h:877: error: `bool QtLP_Private::std::operator==(int)' must take exactly two arguments
C:/Qt/2009.03/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_vector.h: In function `bool QtLP_Private::std::operator==(int)':
C:/Qt/2009.03/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_vector.h:878: error: `__x' was not declared in this scope
C:/Qt/2009.03/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_vector.h:878: error: `__y' was not declared in this scope
C:/Qt/2009.03/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_vector.h:879: error: `equal' is not a member of `QtLP_Private::std'

...



Thanks

FinderCheng
24th October 2009, 05:16
Same problem with QVector on Windows releaase mode. Could anybody tell me why? Thanks!

bmn
28th October 2009, 11:36
Yes there's an issue whose origin is still unknown, and happens on Mac too.
There's an issue on Qt Issue tracker (http://bugreports.qt.nokia.com/browse/QTSOLBUG-72) about this problem, and starting from yesterday anyone can register and vote for an issue to push nokia to fix it, and write comments too.
If you'd like to see it solved you should sign up and vote for it.

Bye