Feedback: Working with Qt Applications - NetBeans IDE 6.8 Tutorial

  • From: "alexandrox" < >
  • To:
  • Subject: Feedback: Working with Qt Applications - NetBeans IDE 6.8 Tutorial
  • Date: Fri, 01 Feb 2013 18:08:47 -0500

Thank you, soldatov for your quick reply.

1. Ok, I understand it's not strictly necessary but highly recommendable to 
use version 4.7 or 4.8 instead of 5.0.1. I haven't noticed before about the 
release date. My mistake.

2. I don't speak russian, so I don't know what it says... but it did help me 
realize that "QApplication" might be in another folder, actually I found it 
in "<Qt_bin_folder>/include/QtWidgets" (I should have done that before...)so, 
I replaced 
Code:
#include <QtGui/QApplication>

 by 
Code:
#include <QtWidgets/QApplication>

 
Doing this all the red marks in the code disappeared and so does the problem 
regarding to *.ui file not found. 
But... there's another problem, when I try to build the project again, there 
are new errors about "ld.exe" not finding a few files. 


Code:
CLEAN SUCCESSFUL (total time: 875ms)

"/usr/bin/make" -f nbproject/Makefile-Debug.mk 
QMAKE=/D/Qt/Qt5.0.1/5.0.1/mingw47_32/bin/qmake.exe SUBPROJECTS= .build-conf
make[1]: Entering directory `/d/Documents and Settings/Alejandro/Mis 
documentos/NetBeansProjects/Hello'
/D/Qt/Qt5.0.1/5.0.1/mingw47_32/bin/qmake.exe VPATH=. -spec win32-g++ -o 
qttmp-Debug.mk nbproject/qt-Debug.pro
mv -f qttmp-Debug.mk nbproject/qt-Debug.mk
"/usr/bin/make" -f nbproject/qt-Debug.mk dist/Debug/Qt_MinGW-Windows/Hello.exe
make[2]: Entering directory `/d/Documents and Settings/Alejandro/Mis 
documentos/NetBeansProjects/Hello'
D:/Qt/Qt5.0.1/5.0.1/mingw47_32/bin/uic.exe HelloForm.ui -o ui_HelloForm.h
g++.exe -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra 
-fexceptions -mthreads -DUNICODE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB 
-DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DQT_NEEDS_QMAIN -Inbproject 
-I'../../../../../Qt/Qt5.0.1/5.0.1/mingw47_32/include' 
-I'../../../../../Qt/Qt5.0.1/5.0.1/mingw47_32/include/QtWidgets' 
-I'../../../../../Qt/Qt5.0.1/5.0.1/mingw47_32/include/QtGui' 
-I'../../../../../Qt/Qt5.0.1/5.0.1/mingw47_32/include/QtCore' -I'.' -I'.' 
-I'.' -I'../../../../../Qt/Qt5.0.1/5.0.1/mingw47_32/mkspecs/win32-g++' -o 
build/Debug/Qt_MinGW-Windows/HelloForm.o HelloForm.cpp
g++.exe -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra 
-fexceptions -mthreads -DUNICODE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB 
-DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DQT_NEEDS_QMAIN -Inbproject 
-I'../../../../../Qt/Qt5.0.1/5.0.1/mingw47_32/include' 
-I'../../../../../Qt/Qt5.0.1/5.0.1/mingw47_32/include/QtWidgets' 
-I'../../../../../Qt/Qt5.0.1/5.0.1/mingw47_32/include/QtGui' 
-I'../../../../../Qt/Qt5.0.1/5.0.1/mingw47_32/include/QtCore' -I'.' -I'.' 
-I'.' -I'../../../../../Qt/Qt5.0.1/5.0.1/mingw47_32/mkspecs/win32-g++' -o 
build/Debug/Qt_MinGW-Windows/main.o main.cpp
D:/Qt/Qt5.0.1/5.0.1/mingw47_32/bin/moc.exe -DUNICODE -DQT_WIDGETS_LIB 
-DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE 
-DQT_NEEDS_QMAIN -Inbproject 
-I'../../../../../Qt/Qt5.0.1/5.0.1/mingw47_32/include' 
-I'../../../../../Qt/Qt5.0.1/5.0.1/mingw47_32/include/QtWidgets' 
-I'../../../../../Qt/Qt5.0.1/5.0.1/mingw47_32/include/QtGui' 
-I'../../../../../Qt/Qt5.0.1/5.0.1/mingw47_32/include/QtCore' -I'.' -I'.' 
-I'.' -I'../../../../../Qt/Qt5.0.1/5.0.1/mingw47_32/mkspecs/win32-g++' 
-D__GNUC__ -DWIN32 HelloForm.h -o moc_HelloForm.cpp
g++.exe -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra 
-fexceptions -mthreads -DUNICODE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB 
-DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DQT_NEEDS_QMAIN -Inbproject 
-I'../../../../../Qt/Qt5.0.1/5.0.1/mingw47_32/include' 
-I'../../../../../Qt/Qt5.0.1/5.0.1/mingw47_32/include/QtWidgets' 
-I'../../../../../Qt/Qt5.0.1/5.0.1/mingw47_32/include/QtGui' 
-I'../../../../../Qt/Qt5.0.1/5.0.1/mingw47_32/include/QtCore' -I'.' -I'.' 
-I'.' -I'../../../../../Qt/Qt5.0.1/5.0.1/mingw47_32/mkspecs/win32-g++' -o 
build/Debug/Qt_MinGW-Windows/moc_HelloForm.o moc_HelloForm.cpp
windres -i Hello_resource.rc -o 
build/Debug/Qt_MinGW-Windows/Hello_resource_res.o --include-dir=. -DUNICODE 
-DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 
-DQT_OPENGL_ES_2_ANGLE -DQT_NEEDS_QMAIN
g++ -Wl,-subsystem,windows -mthreads -o dist/Debug/Qt_MinGW-Windows/Hello.exe 
build/Debug/Qt_MinGW-Windows/HelloForm.o build/Debug/Qt_MinGW-Windows/main.o 
build/Debug/Qt_MinGW-Windows/moc_HelloForm.o  -lmingw32 -lqtmaind 
-LD:\Qt\Qt5.0.1\5.0.1\mingw47_32\lib -lQt5Widgetsd -lQt5Guid -lQt5Cored 
-llibEGLd -llibGLESv2d -lgdi32 -luser32 
build/Debug/Qt_MinGW-Windows/Hello_resource_res.o 
make[2]: Leaving directory `/d/Documents and Settings/Alejandro/Mis 
documentos/NetBeansProjects/Hello'
make[1]: Leaving directory `/d/Documents and Settings/Alejandro/Mis 
documentos/NetBeansProjects/Hello'
d:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe:
 cannot find -lqtmaind
d:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe:
 cannot find -lQt5Widgetsd
d:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe:
 cannot find -lQt5Guid
d:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe:
 cannot find -lQt5Cored
d:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe:
 cannot find -llibEGLd
d:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe:
 cannot find -llibGLESv2d
collect2.exe: error: ld returned 1 exit status
make[2]: *** [dist/Debug/Qt_MinGW-Windows/Hello.exe] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2


BUILD FAILED (exit value 2, total time: 5s)



Could it be that there are other files named "QApplication" in some different 
folder and I used the wrong one?

Once again, thank you soldatov for the answer.






Feedback: Working with Qt Applications - NetBeans IDE 6.8 Tutorial

alexandrox 02/01/2013

Feedback: Working with Qt Applications - NetBeans IDE 6.8 Tutorial

soldatov 02/01/2013

Feedback: Working with Qt Applications - NetBeans IDE 6.8 Tutorial

soldatov 02/01/2013

Feedback: Working with Qt Applications - NetBeans IDE 6.8 Tutorial

alexandrox 02/01/2013

Feedback: Working with Qt Applications - NetBeans IDE 6.8 Tutorial

soldatov 02/02/2013

Project Features

About this Project

CND was started in November 2009, is owned by Leonid Lenyashin, and has 130 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close