QStringList Compile Problem
I get a compile error when using QStringList. I have a very simple program:
#include "QApplication.h"
#include "QStringList.h"
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
QStringList strList;
strList << "one" << "two" << "Three";
return app.exec();
}
I do the qmake -project, then qmake testproj.pro, then make. I am using mingw and QT 4.3.2.
I get the following error:
C:\Users\ajonesfl\Cpp Projects\Examples\testproj>make
mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory `C:/Users/ajonesfl/Cpp Projects/Examples/testproj'
g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -Wl,-s -Wl,-subsystem,windows -o "release\test
proj.exe" release\testproj.o -L"c:\Qt\4.2.3\lib" -lmingw32 -lqtmain -lQtGui4 -lQtCore4
release\testproj.o(.text$_ZN5QListI7QStringE13detach_helperEv[QList<QString>::detach_helper()]+0x4c):testproj.cpp: undefined reference to `_imp___ZN9Q
ListData7detach2Ev'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [release\testproj.exe] Error 1
mingw32-make[1]: Leaving directory `C:/Users/ajonesfl/Cpp Projects/Examples/testproj'
mingw32-make: *** [release] Error 2
When I comment out the line: strList << "one" << "two" << "Three";
The program compiles..... Any help would be appreciated on this. Thanks
Adam Jones