Results 1 to 12 of 12

Thread: Re-Compile an old project from 2007

  1. #1
    Join Date
    Jan 2006
    Posts
    273
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Smile Re-Compile an old project from 2007

    Hi Guys,

    I have an old project that need to be recompiled again and I would like to know, if I could use the latest qt version.

    I used in 2007 the following tools:

    OS: Win XP
    Compiler: MinGW 4.1
    QT: 4.1.1

    Can somebody help me to be able to recompile the project again? The reason I have to recompile is because I need to change some code.

    Best Regards

    Raphael
    Think DigitalGasoline

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Re-Compile an old project from 2007

    You could try with the lastet Qt4 version, there shouldn't be that much change there.

    Cheers,
    _

  3. The following user says thank you to anda_skoa for this useful post:

    raphaelf (11th September 2013)

  4. #3
    Join Date
    Jan 2006
    Posts
    273
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Re-Compile an old project from 2007

    Hi!

    Thank you for your answer. I have installed the 4.1.1 Version and I have some errors. Is there maybe missing a path or a project file entry?

    Project File:
    Qt Code:
    1. ######################################################################
    2. # Automatically generated by qmake (2.00a) Fr 6. Sep 11:44:48 2013
    3. ######################################################################
    4.  
    5. TEMPLATE = app
    6. TARGET +=
    7. DEPENDPATH += .
    8. INCLUDEPATH += .
    9. QT += sql
    10. QT += qt3support
    11.  
    12.  
    13.  
    14. # Input
    15. HEADERS += abfrage.h \
    16. admineditor.h \
    17. bemerkungdialog.h \
    18. ergebnisse.h \
    19. gotodialog.h \
    20. licensedialog.h \
    21. licensemanagement.h \
    22. lizenzerweiterndialog.h \
    23. login.h \
    24. mainwindow.h \
    25. softwaredialog.h \
    26. softwaremover.h \
    27. update.h \
    28. updatelicensedialog.h
    29. SOURCES += abfrage.cpp \
    30. admineditor.cpp \
    31. bemerkungdialog.cpp \
    32. ergebnisse.cpp \
    33. gotodialog.cpp \
    34. licensedialog.cpp \
    35. licensemanagement.cpp \
    36. lizenzerweiterndialog.cpp \
    37. login.cpp \
    38. main.cpp \
    39. mainwindow.cpp \
    40. qmake_image_collection.cpp \
    41. softwaredialog.cpp \
    42. softwaremover.cpp \
    43. update.cpp \
    44. updatelicensedialog.cpp
    To copy to clipboard, switch view to plain text mode 


    Erros:
    Qt Code:
    1. D:\1Data\public\ITInventarMigration\Code\18.10.07\inventar>make
    2. qmake -win32 -o Makefile inventar.pro
    3. mingw32-make -f Makefile.Release
    4. mingw32-make[1]: Entering directory `D:/1Data/public/ITInventarMigration/Code/18
    5. .10.07/inventar'
    6. g++ -c -O2 -O2 -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_D
    7. LL -DQT_NO_DEBUG -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_SQL_LIB -DQT_GUI_LIB -DQ
    8. T_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"C:/Qt/4.1.1/include/QtCore" -
    9. I"C:/Qt/4.1.1/include/QtGui" -I"C:/Qt/4.1.1/include/QtSql" -I"C:/Qt/4.1.1/includ
    10. e/Qt3Support" -I"C:/Qt/4.1.1/include" -I"." -I"C:/Qt/4.1.1/include/ActiveQt" -I"
    11. release" -I"." -I"C:/Qt/4.1.1/mkspecs/win32-g++" -o release\abfrage.o abfrage.cp
    12. p
    13. In file included from C:/Qt/4.1.1/include/QtCore/qrect.h:1:0,
    14. from C:/Qt/4.1.1/include/QtGui/../../src/gui/painting/qpaintdev
    15. ice.h:28,
    16. from C:/Qt/4.1.1/include/QtGui/qpaintdevice.h:1,
    17. from C:/Qt/4.1.1/include/QtGui/../../src/gui/kernel/qwidget.h:2
    18. 9,
    19. from C:/Qt/4.1.1/include/QtGui/qwidget.h:1,
    20. from C:/Qt/4.1.1/include/QtGui/../../src/gui/dialogs/qdialog.h:
    21. 27,
    22. from C:/Qt/4.1.1/include/QtGui/qdialog.h:1,
    23. from abfrage.h:14,
    24. from abfrage.cpp:11:
    25. C:/Qt/4.1.1/include/QtCore/../../src/corelib/tools/qrect.h:138:38: warning: inli
    26. ne function 'bool operator==(const QRect&, const QRect&)' declared as dllimport
    27. : attribute ignored [-Wattributes]
    28. C:/Qt/4.1.1/include/QtCore/../../src/corelib/tools/qrect.h:139:38: warning: inli
    29. ne function 'bool operator!=(const QRect&, const QRect&)' declared as dllimport
    30. : attribute ignored [-Wattributes]
    31. C:/Qt/4.1.1/include/QtCore/../../src/corelib/tools/qrect.h:166:27: warning: inli
    32. ne function 'bool operator==(const QRect&, const QRect&)' declared as dllimport
    33. : attribute ignored [-Wattributes]
    34. C:/Qt/4.1.1/include/QtCore/../../src/corelib/tools/qrect.h:167:27: warning: inli
    35. ne function 'bool operator!=(const QRect&, const QRect&)' declared as dllimport
    36. : attribute ignored [-Wattributes]
    37. C:/Qt/4.1.1/include/QtCore/../../src/corelib/tools/qrect.h:560:38: warning: inli
    38. ne function 'bool operator==(const QRectF&, const QRectF&)' declared as dllimpo
    39. rt: attribute ignored [-Wattributes]
    40. C:/Qt/4.1.1/include/QtCore/../../src/corelib/tools/qrect.h:561:38: warning: inli
    41. ne function 'bool operator!=(const QRectF&, const QRectF&)' declared as dllimpo
    42. rt: attribute ignored [-Wattributes]
    43. C:/Qt/4.1.1/include/QtCore/../../src/corelib/tools/qrect.h:573:27: warning: inli
    44. ne function 'bool operator==(const QRectF&, const QRectF&)' declared as dllimpo
    45. rt: attribute ignored [-Wattributes]
    46. C:/Qt/4.1.1/include/QtCore/../../src/corelib/tools/qrect.h:574:27: warning: inli
    47. ne function 'bool operator!=(const QRectF&, const QRectF&)' declared as dllimpo
    48. rt: attribute ignored [-Wattributes]
    49. In file included from C:/Qt/4.1.1/include/QtGui/qrgb.h:1:0,
    50. from C:/Qt/4.1.1/include/QtGui/../../src/gui/painting/qcolor.h:
    51. 27,
    52. from C:/Qt/4.1.1/include/QtGui/qcolor.h:1,
    53. from C:/Qt/4.1.1/include/QtGui/../../src/gui/kernel/qpalette.h:
    54. 28,
    55. ..
    56. ..
    57. ..
    To copy to clipboard, switch view to plain text mode 
    Think DigitalGasoline

  5. #4
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Re-Compile an old project from 2007

    there aren't any errors there...
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  6. The following user says thank you to amleto for this useful post:

    raphaelf (11th September 2013)

  7. #5
    Join Date
    Jan 2006
    Posts
    273
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Re-Compile an old project from 2007

    Hi amleto,

    sorry for that my error has 29'635 characters and its only 1'000 allowed. I have attached the complete error code. Have you or somebody an idea?
    Attached Files Attached Files
    Think DigitalGasoline

  8. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Re-Compile an old project from 2007

    You indicated earlier that you had used Qt4 before, but that looks a lot like Qt3 code.

    For example addMultiCellWidget in QGridLayout got replaced by addWidget having additional row-span and column-span arguments.

    QListView got replaced with QListWidget, thus it is now QListWidgetItem instead of QListViewItem.

    Cheers,
    _

  9. The following user says thank you to anda_skoa for this useful post:

    raphaelf (11th September 2013)

  10. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Re-Compile an old project from 2007

    Quote Originally Posted by anda_skoa View Post
    You indicated earlier that you had used Qt4 before, but that looks a lot like Qt3 code.

    For example addMultiCellWidget in QGridLayout got replaced by addWidget having additional row-span and column-span arguments.

    QListView got replaced with QListWidget, thus it is now QListWidgetItem instead of QListViewItem.
    It might be using Qt3 compatibility layer.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  11. The following user says thank you to wysota for this useful post:

    raphaelf (11th September 2013)

  12. #8
    Join Date
    Jan 2006
    Posts
    273
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Re-Compile an old project from 2007

    Hi Guys,

    Yes I used qt3 compatibility later.

    I have installed QT 4.8.4 now and minGW 4.4 on a XP Machine. Now I have compiled again and have "only" these errors:

    Is there a magic line to add on my project file to compile this old project again? Any chance??

    Qt Code:
    1. C:\Documents and Settings\Administrator\Desktop\18.10.07\inventar>qmake
    2.  
    3. C:\Documents and Settings\Administrator\Desktop\18.10.07\inventar>make
    4. mingw32-make -f Makefile.Debug
    5. mingw32-make[1]: Entering directory `C:/Documents and Settings/Administrator/Des
    6. ktop/18.10.07/inventar'
    7. g++ -c -pipe -g -frtti -fexceptions -mthreads -Wall -Wextra -DUNICODE -DQT_LARGE
    8. FILE_SUPPORT -DQT_DLL -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_SQL_LIB -DQT_GUI_LI
    9. B -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQ
    10. T_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\Qt\4.8.4\include\QtCore"
    11. -I"c:\Qt\4.8.4\include\QtGui" -I"c:\Qt\4.8.4\include\QtSql" -I"c:\Qt\4.8.4\inclu
    12. de\Qt3Support" -I"c:\Qt\4.8.4\include" -I"." -I"c:\Qt\4.8.4\include\ActiveQt" -I
    13. "debug" -I"c:\Qt\4.8.4\mkspecs\default" -o debug\abfrage.o abfrage.cpp
    14. In file included from abfrage.cpp:11:
    15. abfrage.h:30: error: 'WFlags' has not been declared
    16. In file included from abfrage.cpp:12:
    17. ergebnisse.h:32: error: 'WFlags' has not been declared
    18. In file included from abfrage.cpp:13:
    19. mainwindow.h:53: error: 'WFlags' has not been declared
    20. mainwindow.h:53: error: 'WType_TopLevel' was not declared in this scope
    21. abfrage.cpp:34: error: 'WFlags' has not been declared
    22. abfrage.cpp: In constructor 'Abfrage::Abfrage(QWidget*, const char*, bool, int)'
    23. :
    24. abfrage.cpp:35: error: conversion from 'int' to 'Qt::WindowFlags' is ambiguous
    25. c:\Qt\4.8.4\include/QtCore/../../src/corelib/global/qglobal.h:2311: note: candid
    26. ates are: QFlags<Enum>::QFlags(void**) [with Enum = Qt::WindowType] <near match>
    27.  
    28. c:\Qt\4.8.4\include/QtCore/../../src/corelib/global/qglobal.h:2310: note:
    29. QFlags<Enum>::QFlags(Enum) [with Enum = Qt::WindowType] <near match>
    30. abfrage.cpp:70: error: 'WState_Polished' was not declared in this scope
    31. abfrage.cpp:70: error: 'clearWState' was not declared in this scope
    32. abfrage.cpp: In member function 'virtual void Abfrage::openErgebnis()':
    33. abfrage.cpp:144: error: invalid use of incomplete type 'struct QListViewItem'
    34. ergebnisse.h:20: error: forward declaration of 'struct QListViewItem'
    35. abfrage.cpp:163: error: invalid use of incomplete type 'struct QListViewItem'
    36. ergebnisse.h:20: error: forward declaration of 'struct QListViewItem'
    37. abfrage.cpp:185: error: invalid use of incomplete type 'struct QListViewItem'
    38. ergebnisse.h:20: error: forward declaration of 'struct QListViewItem'
    39. abfrage.cpp:207: error: invalid use of incomplete type 'struct QListViewItem'
    40. ergebnisse.h:20: error: forward declaration of 'struct QListViewItem'
    41. abfrage.cpp:232: error: invalid use of incomplete type 'struct QListViewItem'
    42. ergebnisse.h:20: error: forward declaration of 'struct QListViewItem'
    43. abfrage.cpp:258: error: invalid use of incomplete type 'struct QListViewItem'
    44. ergebnisse.h:20: error: forward declaration of 'struct QListViewItem'
    45. abfrage.cpp:265: error: 'class QListView' has no member named 'setColumnText'
    46. abfrage.cpp:266: error: 'class QListView' has no member named 'setColumnText'
    47. abfrage.cpp:267: error: 'class QListView' has no member named 'setColumnText'
    48. abfrage.cpp:268: error: 'class QListView' has no member named 'setColumnText'
    49. abfrage.cpp:269: error: 'class QListView' has no member named 'setColumnText'
    50. abfrage.cpp:289: error: invalid use of incomplete type 'struct QListViewItem'
    51. ergebnisse.h:20: error: forward declaration of 'struct QListViewItem'
    52. abfrage.cpp:297: error: 'class QListView' has no member named 'setColumnText'
    53. abfrage.cpp:298: error: 'class QListView' has no member named 'setColumnText'
    54. abfrage.cpp:299: error: 'class QListView' has no member named 'setColumnText'
    55. abfrage.cpp:300: error: 'class QListView' has no member named 'setColumnText'
    56. abfrage.cpp:301: error: 'class QListView' has no member named 'setColumnText'
    57. abfrage.cpp:315: error: invalid use of incomplete type 'struct QListViewItem'
    58. ergebnisse.h:20: error: forward declaration of 'struct QListViewItem'
    59. abfrage.cpp:321: error: 'class QListView' has no member named 'setColumnText'
    60. abfrage.cpp:322: error: 'class QListView' has no member named 'setColumnText'
    61. abfrage.cpp:323: error: 'class QListView' has no member named 'setColumnText'
    62. abfrage.cpp:324: error: 'class QListView' has no member named 'setColumnText'
    63. abfrage.cpp:325: error: 'class QListView' has no member named 'setColumnText'
    64. abfrage.cpp:334: error: invalid use of incomplete type 'struct QListViewItem'
    65. ergebnisse.h:20: error: forward declaration of 'struct QListViewItem'
    66. mingw32-make[1]: *** [debug/abfrage.o] Error 1
    67. mingw32-make[1]: Leaving directory `C:/Documents and Settings/Administrator/Desk
    68. top/18.10.07/inventar'
    69. mingw32-make: *** [debug] Error 2
    70.  
    71. C:\Documents and Settings\Administrator\Desktop\18.10.07\inventar>
    To copy to clipboard, switch view to plain text mode 

    Here my project file:
    Qt Code:
    1. ######################################################################
    2. # Automatically generated by qmake (1.07a) Di 14. Feb 13:36:06 2006
    3. ######################################################################
    4.  
    5. TEMPLATE = app
    6. INCLUDEPATH += .
    7. QT += sql
    8. QT += qt3support
    9.  
    10.  
    11. # Input
    12. HEADERS += abfrage.h \
    13. admineditor.h \
    14. bemerkungdialog.h \
    15. ergebnisse.h \
    16. gotodialog.h \
    17. licensedialog.h \
    18. licensemanagement.h \
    19. lizenzerweiterndialog.h \
    20. login.h \
    21. mainwindow.h \
    22. softwaredialog.h \
    23. softwaremover.h \
    24. update.h \
    25. updatelicensedialog.h
    26. SOURCES += abfrage.cpp \
    27. admineditor.cpp \
    28. bemerkungdialog.cpp \
    29. ergebnisse.cpp \
    30. gotodialog.cpp \
    31. licensedialog.cpp \
    32. licensemanagement.cpp \
    33. lizenzerweiterndialog.cpp \
    34. login.cpp \
    35. main.cpp \
    36. mainwindow.cpp \
    37. softwaredialog.cpp \
    38. softwaremover.cpp \
    39. update.cpp \
    40. updatelicensedialog.cpp
    41.  
    42.  
    43. IMAGES = images/editcut \
    44. images/editpaste \
    45. images/filenew \
    46. images/fileopen \
    47. images/filesave \
    48. images/print \
    49. images/redo \
    50. images/searchfind \
    51. images/undo \
    52. images/table.png \
    53. images/delete.png \
    54. images/find.png \
    55. images/new.png \
    56. images/leftarrow.png \
    57. images/rightarrow.png \
    58. images/Grafik1.png \
    59. images/icon_13.png \
    60. images/gotocell.png \
    61. images/undo_1.png \
    62. images/redo_1.png \
    63. images/next.png \
    64. images/previous.png \
    65. images/logo1.png \
    66. images/home.png \
    67. images/icon.png \
    68. images/question_icon.png \
    69. images/generic.png \
    70. images/sqlserver.jpg \
    71. images/login.jpg \
    72. images/goto.png
    To copy to clipboard, switch view to plain text mode 
    Think DigitalGasoline

  13. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Re-Compile an old project from 2007

    It's not a matter of the project file. The source code is incorrect, e.g. it is missing some include statements.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  14. The following user says thank you to wysota for this useful post:

    raphaelf (11th September 2013)

  15. #10
    Join Date
    Jan 2006
    Posts
    273
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Re-Compile an old project from 2007

    Hi Wysota,

    the code should be fine because I was able to generate the exe file in the year 2007. Is maybe because I am not using the same mingw version and qt version? I think that I used qt 4.1.1 and mingw 4.1 in 2007. Now I am using qt 4.8.4 and mingw 4.4.

    It would be nice to be able to compile the project again without to change the code.

    What would you suggest?
    Think DigitalGasoline

  16. #11
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Re-Compile an old project from 2007

    Quote Originally Posted by raphaelf View Post
    the code should be fine because I was able to generate the exe file in the year 2007
    You really think nothing has changed in Qt during the past 6 years?
    What would you suggest?
    Some of your source code files are missing includes. There is no way to magically change this without modifying the source.

    abfrage.cpp needs:
    Qt Code:
    1. #include <QListViewItem>
    To copy to clipboard, switch view to plain text mode 
    to get rid of most errors.

    abfrage.h needs to include something that pulls in the Qt namespace before it tries to use the WFlags typedef. Almost any widget related include will do it, so you might just be able to reorder existing includes to achieve this.

    If the ambiguous conversion error persists after fixing those then you'll need to work out how to address that.

  17. The following user says thank you to ChrisW67 for this useful post:

    raphaelf (11th September 2013)

  18. #12
    Join Date
    Jan 2006
    Posts
    273
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Re-Compile an old project from 2007

    Hi Guys,

    I found out that I used qt 3.3.4. I have installed qt 3.3.4 and was able to compile again. Thank you again!
    Think DigitalGasoline

Similar Threads

  1. help,who could help me to compile qt project
    By derekli in forum Qt Programming
    Replies: 3
    Last Post: 13th May 2014, 15:27
  2. Replies: 4
    Last Post: 20th January 2013, 11:01
  3. Unable to compile project
    By vlad230 in forum Newbie
    Replies: 2
    Last Post: 16th June 2012, 14:08
  4. Project compile problems
    By MarkoSan in forum Qt Programming
    Replies: 7
    Last Post: 15th October 2009, 12:54
  5. qmake: add to project but do not compile
    By jesse in forum Newbie
    Replies: 2
    Last Post: 8th November 2007, 16:03

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
  •  
Qt is a trademark of The Qt Company.