Results 1 to 5 of 5

Thread: Migration from Qt 4.8 to Qt 5.12 Msvc 2017

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2019
    Posts
    6
    Thanks
    1
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Migration from Qt 4.8 to Qt 5.12 Msvc 2017

    Hello everybody,

    i m doing a migration from QT 4.8 to 5.12.3
    i m using msvc 2017 and i get a strance compile error that happens in Qt src -- exactly in ../qt/5.12.3/msvc2017/include/QtCore/qjsonarray.h
    please check the scrennshot below.
    qjsonarray.h.jpgQT_Kits.jpg
    could you please help me, thank you in advance
    Cheers,

  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: Migration from Qt 4.8 to Qt 5.12 Msvc 2017

    Post the error, not a screenshot.

    See the compile output tab for the full message

    Cheers,
    _

  3. #3
    Join Date
    May 2019
    Posts
    6
    Thanks
    1
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: Migration from Qt 4.8 to Qt 5.12 Msvc 2017

    Thanks anda_skoa
    Here is the compile Output , thank you :

    09:40:12: Running steps for project UnisetApplication...
    09:40:12: Configuration unchanged, skipping qmake step.
    09:40:12: Starting: "C:\Development\Qt5\Tools\QtCreator\bin\jom.ex e"
    ( if not exist Makefile.Uniset C:\Development\Qt5\5.12.3\msvc2017\bin\qmake.exe -o Makefile.Uniset C:\Development\SVN\Qt_5_12\Uniset.pro -spec win32-msvc "CONFIG+=debug" "CONFIG+=qml_debug" ) && C:\Development\Qt5\Tools\QtCreator\bin\jom.exe -f Makefile.Uniset
    C:\Development\Qt5\Tools\QtCreator\bin\jom.exe -f Makefile.Uniset.Debug
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(134): error C3646: "pointer": Unbekannter šberschreibungsspezifizierer
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(134): error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: "default-int" wird von C++ nicht untersttzt.
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(179): error C3646: "pointer": Unbekannter šberschreibungsspezifizierer
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(179): error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: "default-int" wird von C++ nicht untersttzt.
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(143): error C2440: "<function-style-cast>": "initializer list" kann nicht in "QJsonArray::iterator::QJsonValueRefPtr" konvertiert werden
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(143): note: Der Initialisierer enth„lt zu viele Elemente.
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(192): error C2440: "<function-style-cast>": "QJsonValue" kann nicht in "QJsonArray::const_iterator::QJsonValuePtr" konvertiert werden
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(192): note: Kein benutzerdefinierter Konvertierungsoperator verfgbar, der diese Konvertierung durchfhren kann, oder der Operator kann nicht aufgerufen werden
    jom: C:\Development\SVN\Qt_5_12\Makefile.Uniset.Debug [debug\MeasureFunction.obj] Error 2
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(134): error C3646: "pointer": Unbekannter šberschreibungsspezifizierer
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(134): error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: "default-int" wird von C++ nicht untersttzt.
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(179): error C3646: "pointer": Unbekannter šberschreibungsspezifizierer
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(179): error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: "default-int" wird von C++ nicht untersttzt.
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(143): error C2440: "<function-style-cast>": "initializer list" kann nicht in "QJsonArray::iterator::QJsonValueRefPtr" konvertiert werden
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(143): note: Der Initialisierer enth„lt zu viele Elemente.
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(192): error C2440: "<function-style-cast>": "QJsonValue" kann nicht in "QJsonArray::const_iterator::QJsonValuePtr" konvertiert werden
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(192): note: Kein benutzerdefinierter Konvertierungsoperator verfgbar, der diese Konvertierung durchfhren kann, oder der Operator kann nicht aufgerufen werden

    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(134): error C3646: "pointer": Unbekannter šberschreibungsspezifizierer
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(134): error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: "default-int" wird von C++ nicht untersttzt.
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(179): error C3646: "pointer": Unbekannter šberschreibungsspezifizierer
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(179): error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: "default-int" wird von C++ nicht untersttzt.
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(143): error C2440: "<function-style-cast>": "initializer list" kann nicht in "QJsonArray::iterator::QJsonValueRefPtr" konvertiert werden
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(143): note: Der Initialisierer enth„lt zu viele Elemente.
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(192): error C2440: "<function-style-cast>": "QJsonValue" kann nicht in "QJsonArray::const_iterator::QJsonValuePtr" konvertiert werden
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(192): note: Kein benutzerdefinierter Konvertierungsoperator verfgbar, der diese Konvertierung durchfhren kann, oder der Operator kann nicht aufgerufen werden
    Gui\MeasureWidgetForm\scmmeasure.cpp(83): warning C4150: L”schen eines Zeigers auf den nicht definierten Typ "Ui::SCMMeasure". Destruktor wurde nicht aufgerufen.
    c:\development\svn\qt_5_12\gui\measurewidgetform\s cmmeasure.h(20): note: Siehe Deklaration von "Ui::SCMMeasure"
    jom: C:\Development\SVN\Qt_5_12\Makefile.Uniset.Debug [debug\MeasureFunctionWidget.obj] Error 2
    jom: C:\Development\SVN\Qt_5_12\Makefile.Uniset.Debug [debug\NoMotionAdapter.obj] Error 2
    jom: C:\Development\SVN\Qt_5_12\Makefile.Uniset.Debug [debug\scmmeasure.obj] Error 2
    jom: C:\Development\SVN\Qt_5_12\Makefile.Uniset.Debug [debug\OpticMeasureFunction_CONTOUR_FIT.obj] Error 2
    Vision\ImageProcessing.cpp(800): error C2664: "void ImageProcessing::setActiveRoi(QRect &)" : Konvertierung von Argument 1 von "QRect" in "QRect &" nicht m”glich
    Vision\ImageProcessing.cpp(800): note: Ein nicht konstanter Verweis kann nur an einen L-Wert gebunden werden.
    Vision\ImageProcessing.cpp(1181): error C2664: "void ImageProcessing::setActiveRoi(QRect &)" : Konvertierung von Argument 1 von "QRect" in "QRect &" nicht m”glich
    Vision\ImageProcessing.cpp(1181): note: Ein nicht konstanter Verweis kann nur an einen L-Wert gebunden werden.
    jom: C:\Development\SVN\Qt_5_12\Makefile.Uniset.Debug [debug\ImageProcessing.obj] Error 2
    jom: C:\Development\SVN\Qt_5_12\Makefile.Uniset.Debug [debug\topcamerawidget.obj] Error 2
    jom: C:\Development\SVN\Qt_5_12\Makefile.Uniset.Debug [debug\measurewidgetform.obj] Error 2
    jom: C:\Development\SVN\Qt_5_12\Makefile.Uniset [debug] Error 2
    jom: C:\Development\SVN\Qt_5_12\Makefile [sub-Uniset-pro-make_first-ordered] Error 2
    09:40:37: The process "C:\Development\Qt5\Tools\QtCreator\bin\jom.ex e" exited with code 2.
    Error while building/deploying project UnisetApplication (kit: Desktop Qt 5.12.3 MSVC2017 32bit)
    When executing step "Make"
    09:40:37: Elapsed time: 00:25.

  4. #4
    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: Migration from Qt 4.8 to Qt 5.12 Msvc 2017

    Quote Originally Posted by aymenbest2 View Post
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(134): error C3646: "pointer": Unbekannter šberschreibungsspezifizierer
    c:\development\qt5\5.12.3\msvc2017\include\qtcore\ qjsonarray.h(134): error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: "default-int" wird von C++ nicht untersttzt.
    Very strange errors in qjsonarray.h

    Probably caused by something included before that header. Try to change the include order to see which other header might be causing this.

    Quote Originally Posted by aymenbest2 View Post
    Gui\MeasureWidgetForm\scmmeasure.cpp(83): warning C4150: L”schen eines Zeigers auf den nicht definierten Typ "Ui::SCMMeasure". Destruktor wurde nicht aufgerufen.
    c:\development\svn\qt_5_12\gui\measurewidgetform\s cmmeasure.h(20): note: Siehe Deklaration von "Ui::SCMMeasure"
    That sounds like if you are missing the include for scmmeasure_ui.h

    Quote Originally Posted by aymenbest2 View Post
    Vision\ImageProcessing.cpp(800): error C2664: "void ImageProcessing::setActiveRoi(QRect &)" : Konvertierung von Argument 1 von "QRect" in "QRect &" nicht m”glich
    Vision\ImageProcessing.cpp(800): note: Ein nicht konstanter Verweis kann nur an einen L-Wert gebunden werden.
    Looks like you are trying to pass a temporary QRect to a function that expects a variable.

    Cheers,
    _

  5. #5
    Join Date
    May 2019
    Posts
    6
    Thanks
    1
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: Migration from Qt 4.8 to Qt 5.12 Msvc 2017

    Hello,
    firstly, thank you very much for your help.
    The issues was thas i have included a jsonbackport library to use it in qt 4.8.
    During the migration the compiler found an #include<qJsonArray.h> what is definetly wrong to use since Qt 5.xx.
    So the compile error wasn't appreciable i have to search to all Old include from the Json Lib and to change it like this
    #include <QJsonDocument>
    #include <QJsonObject>
    #include <QJsonArray>
    #include <QJsonValue>

Similar Threads

  1. Problems after building Qt 5.11.2 open source 32 bit with MSVC 2017
    By ForestDweller2 in forum Installation and Deployment
    Replies: 3
    Last Post: 19th March 2019, 18:22
  2. How to moc in VS 2017
    By enekow in forum Newbie
    Replies: 1
    Last Post: 16th November 2017, 17:21
  3. Why is Qt 5.3.0 for MSVC 2013 shipped with the MSVC 2010 redist?
    By bryanburke in forum Installation and Deployment
    Replies: 1
    Last Post: 3rd June 2014, 01:58
  4. Replies: 1
    Last Post: 21st September 2010, 09:58
  5. Problem with compiling Qt 4.6 via MSVC 2010 Beta2 (win32-msvc specs)
    By Erik-Moscow in forum Installation and Deployment
    Replies: 2
    Last Post: 17th December 2009, 19:44

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.