Results 1 to 3 of 3

Thread: Having trouble getting my program to build

  1. #1
    Join Date
    Apr 2006
    Posts
    40
    Thanks
    4
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Having trouble getting my program to build

    I'm using a recent snapshot of qt4.2. I can get my program to compile and link just fine under linux, but I'm getting a real headach trying to do the same under windows2000.

    Apparently everything compiles ok, but I get all sorts of errors like this:

    Qt Code:
    1. g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runt
    2. ime-pseudo-reloc -Wl,-s -Wl,-s -Wl,-subsystem,windows -o "release\trainingdb.exe
    3. " object_script.testingdb.Release -L"c:\qt4.2\lib" -lmingw32 -lqtmain -lQtSql4
    4. -lQtXml4 -lQtGui4 -lQtCore4 -lQtDesigner4 -LC:\mysql\lib
    5. ./release\addcompet.o(.text+0x3f26):addcompet.cpp: undefined reference to `_imp_
    6. __ZN11QMessageBox7warningEP7QWidgetRK7QStringS4_6QFlagsINS_14StandardButtonEES6_
    7. '
    8. ./release\addcompet.o(.text+0x4299):addcompet.cpp: undefined reference to `_imp_
    9. __ZN11QMessageBox7warningEP7QWidgetRK7QStringS4_6QFlagsINS_14StandardButtonEES6_
    10. '
    11. ./release\addcomtrain.o(.text+0x59e7):addcomtrain.cpp: undefined reference to `_
    12. imp___ZN11QMessageBox11informationEP7QWidgetRK7QStringS4_6QFlagsINS_14StandardBu
    13. ttonEES6_'
    14. ./release\addcomtrain.o(.text+0x7664):addcomtrain.cpp: undefined reference to `_
    15. imp___ZN11QMessageBox7warningEP7QWidgetRK7QStringS4_6QFlagsINS_14StandardButtonE
    16. ES6_'
    To copy to clipboard, switch view to plain text mode 

    I really have no clue why the program won't link properly.

    Here's my .pro file:

    Qt Code:
    1. QT+=sql
    2. TEMPLATE = app
    3. TARGET =
    4. DEPENDPATH += . release datepicker forms src src/headers
    5. INCLUDEPATH += . datepicker src/headers
    6. CONFIG += designer plugin release_and_debug
    7.  
    8. # Input
    9. HEADERS += src/headers/addcompet.h \
    10. src/headers/addcomtrain.h \
    11. src/headers/addemp.h \
    12. src/headers/connectdialog.h \
    13. src/headers/dbselectdialog.h \
    14. src/headers/itemadder.h \
    15. src/headers/logindialog.h \
    16. src/headers/mainwindow.h \
    17. src/headers/querybuilder.h \
    18. src/headers/report.h \
    19. src/headers/sqlconnector.h \
    20. datepicker/datepicker.h
    21. FORMS += datepicker/datepicker.ui \
    22. forms/addcomtrain.ui \
    23. forms/addcompet.ui \
    24. forms/addemployee.ui \
    25. forms/connectdialog.ui \
    26. forms/dbselect.ui \
    27. forms/itemadder.ui \
    28. forms/logindialog.ui \
    29. forms/report.ui \
    30. forms/querybuilder.ui \
    31. forms/mainwindow.ui
    32. SOURCES += src/addcompet.cpp \
    33. src/addcomtrain.cpp \
    34. src/addemp.cpp \
    35. src/connectdialog.cpp \
    36. src/dbselectdialog.cpp \
    37. src/itemadder.cpp \
    38. src/logindialog.cpp \
    39. src/main.cpp \
    40. src/mainwindow.cpp \
    41. src/querybuilder.cpp \
    42. src/report.cpp \
    43. src/sqlconnector.cpp \
    44. datepicker/datepicker.cpp
    To copy to clipboard, switch view to plain text mode 

    I'm really out of ideas for how to fix this.

  2. #2
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Having trouble getting my program to build

    Looks like the problem is with QMessageBox in addcompet.cpp

  3. #3
    Join Date
    Apr 2006
    Posts
    40
    Thanks
    4
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Having trouble getting my program to build

    Ok, I need more sleep. Just ignore me. I grabbed a fresh snapshot, and compiled everything fresh and everything is fine. I don't know why I just didn't think of doing that sooner.

Similar Threads

  1. Release my simple program to other users ?
    By probine in forum Qt Programming
    Replies: 9
    Last Post: 9th July 2006, 23:42
  2. QMAKE: Specifying Build Dependencies
    By JohnSuykerbuyk in forum Qt Programming
    Replies: 1
    Last Post: 5th May 2006, 09:46
  3. preparing program for release
    By impeteperry in forum Installation and Deployment
    Replies: 5
    Last Post: 22nd April 2006, 19:30
  4. Enter key causing program to exit
    By welby in forum Qt Programming
    Replies: 2
    Last Post: 9th March 2006, 16:11
  5. Memory Trouble
    By nimrod in forum Newbie
    Replies: 4
    Last Post: 6th February 2006, 18:45

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.