Chào mừng đến với Diễn đàn lập trình - Cộng đồng lập trình.
Kết quả 1 đến 4 của 4
  1. #1
    Ngày tham gia
    Sep 2015
    Bài viết
    0

    Lập trình Qt trong Netbeans. Giúp mình cài và biên dịch?

    Em cài Netbeans rồi MinGW với MSYS giống theo hướng dẫn của netbeans
    http:/etbeans.org/community/releas...pilers_windows
    Sau khi cài thì đã thử build, debug rồi chạy được cái project C/C++ Welcome trong Sample Project của Netbeans. Sau đó em làm theo hướng dẫn để cài Qt
    http:/etbeans.org/kb/docs/cnd/qt-applications.html
    Thế nhưng đến đoạn build thử thì nó ko build được, Netbeans báo lỗi như thế này:
    Mã:
    /usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf
    make[1]: Entering directory `/c/Users/tatung/Documents/NetBeansProjects/HelloForm'
    /c/Qt/4.6.2/bin/qmake.exe VPATH=. -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/MinGW-Windows/HelloForm.exe
    make[2]: Entering directory `/c/Users/tatung/Documents/NetBeansProjects/HelloForm'
    c:/Qt/4.6.2/bin/uic.exe HelloForm.ui -o ui_HelloForm.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'c:/Qt/4.6.2/include/QtCore' -I'c:/Qt/4.6.2/include/QtGui' -I'c:/Qt/4.6.2/include' -I'c:/Qt/4.6.2/include/ActiveQt' -I'.' -I'.' -I'nbproject' -I'.' -I'c:/Qt/4.6.2/mkspecs/default' -o build/Debug/MinGW-Windows/HelloForm.o HelloForm.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'c:/Qt/4.6.2/include/QtCore' -I'c:/Qt/4.6.2/include/QtGui' -I'c:/Qt/4.6.2/include' -I'c:/Qt/4.6.2/include/ActiveQt' -I'.' -I'.' -I'nbproject' -I'.' -I'c:/Qt/4.6.2/mkspecs/default' -o build/Debug/MinGW-Windows/main.o main.cpp
    C:/Qt/4.6.2/bin/moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I'c:/Qt/4.6.2/include/QtCore' -I'c:/Qt/4.6.2/include/QtGui' -I'c:/Qt/4.6.2/include' -I'c:/Qt/4.6.2/include/ActiveQt' -I'.' -I'.' -I'nbproject' -I'.' -I'c:/Qt/4.6.2/mkspecs/default' -D__GNUC__ -DWIN32 HelloForm.h -o moc_HelloForm.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'c:/Qt/4.6.2/include/QtCore' -I'c:/Qt/4.6.2/include/QtGui' -I'c:/Qt/4.6.2/include' -I'c:/Qt/4.6.2/include/ActiveQt' -I'.' -I'.' -I'nbproject' -I'.' -I'c:/Qt/4.6.2/mkspecs/default' -o build/Debug/MinGW-Windows/moc_HelloForm.o moc_HelloForm.cpp
    windres -i HelloForm_resource.rc -o build/Debug/MinGW-Windows/HelloForm_resource_res.o --include-dir=.
    g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o dist/Debug/MinGW-Windows/HelloForm.exe build/Debug/MinGW-Windows/HelloForm.o build/Debug/MinGW-Windows/main.o build/Debug/MinGW-Windows/moc_HelloForm.o  -L'c:/Qt/4.6.2/lib' -lmingw32 -lqtmaind build/Debug/MinGW-Windows/HelloForm_resource_res.o -lQtGuid4 -lQtCored4 
    c:/Qt/4.6.2/lib/libqtmaind.a(qtmain_win.o): In function `WinMain@16':
    C:\iwmake\build_mingw_opensource\src\winmain/qtmain_win.cpp:93: undefined reference to `_Unwind_Resume'
    C:\iwmake\build_mingw_opensource\src\winmain/qtmain_win.cpp:135: undefined reference to `_Unwind_Resume'
    c:/Qt/4.6.2/lib/libqtmaind.a(qtmain_win.o):C:\iwmake\build_mingw_opensource\src\winmain/../../include/QtCore/../../src/corelib/tools/qvector.h:482: undefined reference to `_Unwind_Resume'
    c:/Qt/4.6.2/lib/libqtmaind.a(qtmain_win.o):C:\iwmake\build_mingw_opensource\src\winmain/../../include/QtCore/../../src/corelib/tools/qvector.h:483: undefined reference to `_Unwind_Resume'
    c:/Qt/4.6.2/lib/libqtmaind.a(qtmain_win.o):qtmain_win.cpp:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
    collect2: ld returned 1 exit status
    make[2]: *** [dist/Debug/MinGW-Windows/HelloForm.exe] Error 1
    make[2]: Leaving directory `/c/Users/tatung/Documents/NetBeansProjects/HelloForm'
    make[1]: *** [.build-conf] Error 2
    make[1]: Leaving directory `/c/Users/tatung/Documents/NetBeansProjects/HelloForm'
    make: *** [.build-impl] Error 2
    BUILD FAILED (exit value 2, total time: 3s)
    Em cũng thử build project mẫu của netbean là Hello Qt world nhưng mà cũng bị dính lỗi như trên.
    Em mò mẫm rồi cài đi cài lại mấy lần rồi mà không được[IMG]images/smilies/21.gif[/IMG] Ai biết giúp em với.

  2. #2
    Ngày tham gia
    Sep 2015
    Bài viết
    0
    OK rồi, em không cài riêng MinGW theo instruction của netbeans nữa mà down Qt SDK về rồi lấy MinGW sẵn của Qt SDK luôn, giờ chạy ngon lành rồi [IMG]images/smilies/biggrin.png[/IMG]

  3. #3
    Ngày tham gia
    Sep 2015
    Bài viết
    0
    Tại sao không dùng ngay cái QT Cteator?

  4. #4
    Thật ra em mới đang tìm hiểu nên muốn cài cắm lung tung tí xem [IMG]images/smilies/smile.png[/IMG]

 

 

Quyền viết bài

  • Bạn Không thể gửi Chủ đề mới
  • Bạn Không thể Gửi trả lời
  • Bạn Không thể Gửi file đính kèm
  • Bạn Không thể Sửa bài viết của mình
  •