Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Compile #error Add the datastream version for...
Forum Updated to NodeBB v4.3 + New Features

Compile #error Add the datastream version for...

Scheduled Pinned Locked Moved Unsolved Qt 6
1 Posts 1 Posters 380 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mark_K
    wrote on 23 Jun 2021, 20:54 last edited by Mark_K
    #1

    I've got output on empty project

    cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -permissive- -Zc:__cplusplus -Zc:externConstexpr -O2 -MD -std:c++latest -utf-8 -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -EHsc -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DQT_DISABLE_DEPRECATED_BEFORE=0x060000 -DMAJOR_NUMBER -D= -D0 -DMINOR_NUMBER -D= -D0 -DBUILD_NUMBER -D= -D257 -DNDEBUG -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -IC:\Qt\6.0.0\msvc2019_64\include -IC:\Qt\6.0.0\msvc2019_64\include\QtWidgets -IC:\Qt\6.0.0\msvc2019_64\include\QtGui -IC:\Qt\6.0.0\msvc2019_64\include\QtCore -I..\..\tmp\release\win32\ru.tkaspb.MONITOR.x86_64\moc -IC:\Qt\6.0.0\msvc2019_64\mkspecs\win32-msvc -Fo..\..\tmp\release\win32\ru.tkaspb.MONITOR.x86_64\obj\ @C:\Users\MRBFE9~1.STA\AppData\Local\Temp\mainwindow.obj.15176.782.jom
    mainwindow.cpp
    C:\Qt\6.0.0\msvc2019_64\include\QtCore/qdatastream.h(103): fatal error C1189: #error:  Add the datastream version for this Qt version and update Qt_DefaultCompiledVersion
    jom: D:\AFINA\src\MONITOR\Makefile [..\..\tmp\release\win32\ru.tkaspb.MONITOR.x86_64\obj\mainwindow.obj] Error 2
    

    then tested with qmake message($$QT_VERSION) got 6.0.0
    than

    template<int A> class Check
    {
    public:
        static_assert (QT_VERSION < 0x060100, "fff");
    
        static constexpr bool value = A >= 0x060100;
    };
    
    constexpr bool c = Check<QT_VERSION>::value;
    

    got

    cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -permissive- -Zc:__cplusplus -Zc:externConstexpr -O2 -MD -std:c++latest -utf-8 -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -EHsc -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DQT_DISABLE_DEPRECATED_BEFORE=0x060000 -DMAJOR_NUMBER -D= -D0 -DMINOR_NUMBER -D= -D0 -DBUILD_NUMBER -D= -D258 -DNDEBUG -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -IC:\Qt\6.0.0\msvc2019_64\include -IC:\Qt\6.0.0\msvc2019_64\include\QtWidgets -IC:\Qt\6.0.0\msvc2019_64\include\QtGui -IC:\Qt\6.0.0\msvc2019_64\include\QtCore -I..\..\tmp\release\win32\ru.tkaspb.MONITOR.x86_64\moc -IC:\Qt\6.0.0\msvc2019_64\mkspecs\win32-msvc -Fo..\..\tmp\release\win32\ru.tkaspb.MONITOR.x86_64\obj\ @C:\Users\MRBFE9~1.STA\AppData\Local\Temp\mainwindow.obj.12252.219.jom
    mainwindow.cpp
    C:\Qt\6.0.0\msvc2019_64\include\QtCore/qdatastream.h(61): error C2338: fff
    C:\Qt\6.0.0\msvc2019_64\include\QtCore/qdatastream.h(64): note: see reference to class template instantiation 'Check<393473>' being compiled
    C:\Qt\6.0.0\msvc2019_64\include\QtCore/qdatastream.h(112): fatal error C1189: #error:  Add the datastream version for this Qt version and update Qt_DefaultCompiledVersion
    

    393473 is 0x060101 .... 0.o

    then

    template<int a, int b,int c> class Check
    {
    public:
        static_assert (QT_VERSION_MAJOR == 0x06, "sss");
        static_assert (QT_VERSION_MINOR == 0x00, "ddd");
        static_assert (QT_VERSION_PATCH == 0x00, "aaa");
        static_assert (QT_VERSION < 0x060100, "fff");
    
        static constexpr bool value = a >= 0x060100;
    };
    
    constexpr bool c = Check<QT_VERSION_MAJOR, QT_VERSION_MINOR, QT_VERSION_PATCH>::value;
    
    

    got

    C:\Qt\6.0.0\msvc2019_64\include\QtCore/qdatastream.h(63): error C2338: fff
    C:\Qt\6.0.0\msvc2019_64\include\QtCore/qdatastream.h(66): note: see reference to class template instantiation 'Check<a,b,c>' being compiled
    C:\Qt\6.0.0\msvc2019_64\include\QtCore/qdatastream.h(114): fatal error C1189: #error:  Add the datastream version for this Qt version and update Qt_DefaultCompiledVersion
    jom: D:\AFINA\src\MONITOR\Makefile [..\..\tmp\release\win32\ru.tkaspb.MONITOR.x86_64\obj\mainwindow.obj] Error 2
    jom: D:\AFINA\Makefile [MONITOR-make_first-ordered] Error 2
    

    math is making magic?
    'Check<a,b,c>' this way is not showing nombers any more at all...
    what is wrong?

    1 Reply Last reply
    0

    1/1

    23 Jun 2021, 20:54

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved