PDA

View Full Version : problems simply compiling QtCreator on windows



Amelie
23rd February 2011, 10:07
Hello,

I just wrote my first QtCreator UI and am now trying to compile it, but am not getting anywhere. The purpose is to write a python (2.7) plugin for Quantum GIS, but I can't get a .py file. I am completely new to Qt, and pretty new to Python/Programming.
I am running QtCreator 2.0.1 (QtDesigner 4.7.0) Windows 7 (in VBox on a Mac 10.6 host).
I did run "qmake filename.pro" (in the Qt command prompt, but not running make right after) and now have the following files:
filename.pro
mainwindow.ui
mainwindow.h
main.cpp
mainwindow.cpp
filename.qrc (empty)
folder: filename-build-desktop (empty)

Where do I go from here? i am completely lost and can't seem to find anything online (though there is tons of stuff, but I just don't understand what to work with).

I did look into mingw and noticed that in QT/2010.05/mingw/bin there's no qmake.exe

Do I need to have the qt-creator-2.0.1-src? I did download and unpack it, but trying to move it anywhere but the Vbox shared folder I get an error msg


Thank you so much for any help.

P.S. Should this be my second post, I'm sincerely sorry. I posted one yesterday, but the browser crashed and now I couldn't find the post anywhere, so I'd assume it didn't go through.

franz
23rd February 2011, 10:51
qmake.exe is not part of the MinGW tool kit. It should be found in QT/2010.5/qt/bin though.

Amelie
23rd February 2011, 14:37
By now I actually got a wee bit further. But I still can't go all the way. Help!

I have run qmake and am now clicking the "build" button. The folder thats created as target contains
debug (folder)
release (folder)
Makefile.Debug
Makefile.Release
ui_mainwindow.h


(note: I'm running Qt in German, I translated the parts in German, but they may not be word by word as they'd appear in English).

Executing Build steps for the projec filename...
Starte "c:/qt/2010.05/qt/bin/qmake.exe" C:/.../filename.pro -r -spec win32-g++
The process "c:/qt/2010.05/qt/bin/qmake.exe" was finished normally.
Start "C:/Qt/2010.05/mingw/bin/mingw32-make.exe" -w
mingw32-make: Entering directory `C:/Users/.../Desktop/filename-build-desktop'

C:/Qt/2010.05/mingw/bin/mingw32-make -f Makefile.Debug

mingw32-make[1]: Entering directory `C:/Users/.../Desktop/filename-build-desktop'

c:\Qt\2010.05\qt\bin\uic.exe ..\filename\mainwindow.ui -o ui_mainwindow.h

g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\..\Qt\2010.05\qt\include\QtCore" -I"..\..\..\..\Qt\2010.05\qt\include\QtGui" -I"..\..\..\..\Qt\2010.05\qt\include" -I"..\..\..\..\Qt\2010.05\qt\include\ActiveQt" -I"debug" -I"." -I"..\filename" -I"." -I"..\..\..\..\Qt\2010.05\qt\mkspecs\win32-g++" -o debug\main.o ..\filename\main.cpp

g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\..\Qt\2010.05\qt\include\QtCore" -I"..\..\..\..\Qt\2010.05\qt\include\QtGui" -I"..\..\..\..\Qt\2010.05\qt\include" -I"..\..\..\..\Qt\2010.05\qt\include\ActiveQt" -I"debug" -I"." -I"..\filename" -I"." -I"..\..\..\..\Qt\2010.05\qt\mkspecs\win32-g++" -o debug\mainwindow.o ..\filename\mainwindow.cpp

C:\Qt\2010.05\qt\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\..\Qt\2010.05\qt\include\QtCore" -I"..\..\..\..\Qt\2010.05\qt\include\QtGui" -I"..\..\..\..\Qt\2010.05\qt\include" -I"..\..\..\..\Qt\2010.05\qt\include\ActiveQt" -I"debug" -I"." -I"..\filename" -I"." -I"..\..\..\..\Qt\2010.05\qt\mkspecs\win32-g++" -D__GNUC__ -DWIN32 ..\filename\mainwindow.h -o debug\moc_mainwindow.cpp

g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\..\Qt\2010.05\qt\include\QtCore" -I"..\..\..\..\Qt\2010.05\qt\include\QtGui" -I"..\..\..\..\Qt\2010.05\qt\include" -I"..\..\..\..\Qt\2010.05\qt\include\ActiveQt" -I"debug" -I"." -I"..\filename" -I"." -I"..\..\..\..\Qt\2010.05\qt\mkspecs\win32-g++" -o debug\moc_mainwindow.o debug\moc_mainwindow.cpp

c:\Qt\2010.05\qt\bin\rcc.exe -name filename ..\filename\filename.qrc -o debug\qrc_filename.cpp

g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\..\Qt\2010.05\qt\include\QtCore" -I"..\..\..\..\Qt\2010.05\qt\include\QtGui" -I"..\..\..\..\Qt\2010.05\qt\include" -I"..\..\..\..\Qt\2010.05\qt\include\ActiveQt" -I"debug" -I"." -I"..\filename" -I"." -I"..\..\..\..\Qt\2010.05\qt\mkspecs\win32-g++" -o debug\qrc_filename.o debug\qrc_filename.cpp

g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug\filename.exe debug/main.o debug/mainwindow.o debug/moc_mainwindow.o debug/qrc_filename.o -L"c:\Qt\2010.05\qt\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4

debug/moc_mainwindow.o:C:\Users\...\Desktop\filename-build-desktop/debug/moc_mainwindow.cpp: 78: undefined reference to `MainWindow::on_currentLayerCombo_activated(QStrin g)'

debug/moc_mainwindow.o:C:\Users\...\Desktop\filename-build-desktop/debug/moc_mainwindow.cpp: 79: undefined reference to `MainWindow::on_browseRadio_clicked()'

debug/moc_mainwindow.o:C:\Users\...\Desktop\filename-build-desktop/debug/moc_mainwindow.cpp: 80: undefined reference to `MainWindow::on_activeRadio_clicked()'

mingw32-make[1]: Leaving directory `C:/Users/Amelie/Desktop/filename-build-desktop'

mingw32-make: Leaving directory `C:/Users/.../Desktop/filename-build-desktop'

debug/moc_mainwindow.o:C:\Users\...\Desktop\filename-build-desktop/debug/moc_mainwindow.cpp: 81: undefined reference to `MainWindow::on_tabWidget_currentChanged(int)'

collect2: ld returned 1 exit status

mingw32-make[1]: *** [debug\filename.exe] Error 1

mingw32-make: *** [debug] Error 2

The process "C:/Qt/2010.05/mingw/bin/mingw32-make.exe" was finished with the return value %2.
Error when building the project filename(target: Desktop) when executing build step 'Make'