Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

vs2015 errors with (git) source code



  • Ls,

    My Pc: Microsoft Visual Studio Community 2015
    Version 14.0.25431.01 Update 3
    Microsoft .NET Framework
    Version 4.7.02556

    I get the source code on 21-04-2018 with:

    git://code.qt.io/qt/qt5.git

    configure -developer-build -opensource

    nmake

    I get first error:
    qsharedimageloader.cpp line 176 sign/insigned mismatch

    I solved with:
    //if (size > std::numeric_limits<int>::max())
    size_t size_jma = std::numeric_limits<int>::max();
    if (size > size_jma)

    Second error:

    qdeclarativetextinput.cpp
    graphicsitems\qdeclarativetextinput.cpp(517): error C2039: 'setCursorBlinkPeriod': is not a member of 'QWidgetLineControl'
    c:\dev\persinfonet\qt5\qtbase\include\qtwidgets\5.11.0\qtwidgets\private../../../../../src/widgets/widgets/qwidgetlinecontrol_p.h(82): note: see declaration of 'QWidgetLineControl'

    I "solved error" by commenting the line number 517 :

    //d->control->setCursorBlinkPeriod(on?QApplication::cursorFlashTime():0);

    Last error:

    0_1524591080352_error_pro_location.jpg

    Maybe that someone has advise for me.


  • Moderators

    Have you initialized Qt repository? Here's the guide: https://wiki.qt.io/Building_Qt_5_from_Git


  • Moderators

    Also, what branch is this?



  • @sierdzio

    git://code.qt.io/qt/qt5.git

    qt5vars1.bat
    cd "C:\dev\persinfonet\qt5"
    CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
    REM CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
    SET _ROOT="C:\dev\persinfonet\qt5"
    SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH%
    REM SET QMAKESPEC=win32-msvc2015
    SET _ROOT=

    qt5vars2.bat
    configure -developer-build -opensource -nomake examples -nomake tests

    First i downlaod the qt code with git, after that, I run qt5vars1.bat and qt5vars2.bat
    nmake

    0_1524821187974_qsharedimageloader_signed_unsigned_mismatch.jpg


  • Lifetime Qt Champion

    @jan-marco-alkema Where is

    perl init-repository
    

    as described in the link @sierdzio posted?



  • @jsulm said in vs2015 errors with (git) source code:

    perl init-repository

    0_1524827880849_perl_init_repository.jpg

    I read the manual as if you what something else (not default) you must do the 'perl init repository' command. See :

    0_1524828074506_specificreleaseofQt.jpg

    I used standard git source code ("branch") download:

    0_1524828105330_tortoisegit_qt5.jpg


  • Moderators

    Repo init is still necessary (unless you download source code as .zip archive). Please run it.

    Regarding your error, pass the flag -no-warnings-as-errors (check in configure help if I remember the syntax correctly) to silence this warning/error.



  • @sierdzio said in vs2015 errors with (git) source code:

    Regarding your error, pass the flag -no-warnings-as-errors (check in configure help if I remember the syntax correctly) to silence this warning/error.

    -warnings-are-errors . Treat warnings as errors [no; yes if -developer-build]

    There sees to be no "-no-warnings-as-errors" configure option.

    The 'warning as errors' comes from the "-developer-build" configure option.

    A little bit strange to compile the source code not as "-developer-build". I will try it with "-developer-build" configure option removed.


  • Moderators

    Yes you can skip the -developer-build. But I'm pretty sure the -no-warnings-as-errors exists as well, even though it may be unlisted. Configure help states in the beginning that most flags can be negated with -no.


  • Moderators

    @jan-marco-alkema said in vs2015 errors with (git) source code:

    The 'warning as errors' comes from the "-developer-build" configure option.

    Because -developer-build is for when you're building Qt to contribute to its codebase. Use -debug or -release and specify -prefix directory so make install succeeds.



  • 1:git://code.qt.io/qt/qt5.git

    2:qt5vars1.bat
    cd "C:\dev\persinfonet\qt5"
    CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
    REM CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
    SET _ROOT="C:\dev\persinfonet\qt5"
    SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH%
    REM SET QMAKESPEC=win32-msvc2015
    SET _ROOT=

    3:qt5vars2d.bat
    perl init-repository -f
    configure -debug-and-release -opensource -platform win32-msvc2015 -nomake examples -nomake tests -prefix "C:\dev\persinfonet\Qt_all\Kits\Qt57MSVC2015_32bit"
    "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\nmake" install

    First I download the qt code with git (1:git://code.qt.io/qt/qt5.git), after that, I run qt5vars1.bat and qt5vars2d.bat
    Later I run command:
    nmake

    I get the error:
    0_1524945145812_setcursorblinkperiod_is_not_member_of_qwidgetlineControl.jpg


  • Moderators

    @jan-marco-alkema said in vs2015 errors with (git) source code:

    3:qt5vars2d.bat
    perl init-repository -f

    Did you check out a specific version of Qt? See your earlier screenshot:

    Screenshot of instructions

    Call these commands to clean out your old files and check out a proper version:

    > git clean -dfx
    > git submodule foreach "git clean -dfx"
    > git checkout v5.10.1
    > git submodule update
    

    After that, delete C:\dev\persinfonet\Qt_all\Kits\Qt57MSVC2015_32bit and try building again.



  • @JKSH

    After that, delete C:\dev\persinfonet\Qt_all\Kits\Qt57MSVC2015_32bit and try building again.
    0_1525087429895_Qt57MSVC2015_32bit_is_not_searchable.jpg

    Did you check out a specific version of Qt? See your earlier screenshot:
    No, I did a standard toirtoise git download:

    1:git://code.qt.io/qt/qt5.git
    0_1525087332735_tortoisegit_qt_download2.jpg

    2:qt5vars1.bat
    cd "C:\dev\persinfonet\qt5"
    CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
    REM CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
    SET _ROOT="C:\dev\persinfonet\qt5"
    SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH%
    REM SET QMAKESPEC=win32-msvc2015
    SET _ROOT=

    3:qt5git3.bat
    cd "C:\dev\persinfonet\qt5"
    git clean -dfx
    git submodule foreach "git clean -dfx"
    git checkout v5.10.1
    git submodule update

    4:qt5vars2d.bat
    cd "C:\dev\persinfonet\qt5"
    perl init-repository -f
    configure -debug-and-release -opensource -platform win32-msvc2015 -nomake examples -nomake tests -prefix "C:\dev\persinfonet\Qt_all\Kits\Qt57MSVC2015_32bit"
    "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\nmake" install

    First I download the qt code with git (1:git://code.qt.io/qt/qt5.git), after that, I run qt5vars1.bat, qt5git3.bat and qt5vars2d.bat

    Later I run command:
    nmake

    I keep getting the error:
    0_1525087346784_setcursorblinkperiod_is_not_member_of_qwidgetlinecontrol.jpg


  • Lifetime Qt Champion

    Hi,

    From the looks of it, you didn't checkout all modules at 5.10.1, did you ?


  • Moderators

    OK, I just realized that qdeclarativetextinput.cpp is from qtquick1.git which is deprecated. QWidgetLineControl::setCursorBlinkPeriod() has indeed been removed, which breaks the build: http://code.qt.io/cgit/qt/qtbase.git/commit/?id=1b5bc9723c0b23ca5197097c3087df6bbe024a2a

    Does anyone know the proper way to omit qtquick1.git from the repo initialization?

    @jan-marco-alkema Follow the steps from my previous post again (but you don't need to run TortoiseGit or call init-repository anymore). This time, also delete C:\dev\persinfonet\qt5\qtquick1\ before you run configure. Now, Visual Studio won't try to build broken code.



  • @JKSH

    3:qt5git3.bat
    cd "C:\dev\persinfonet\qt5"
    git clean -dfx
    git submodule foreach "git clean -dfx"
    git checkout v5.10.1
    git submodule update

    4:qt5vars2d.bat
    cd "C:\dev\persinfonet\qt5"
    rd /s /q "C:\dev\persinfonet\qt5\qtquick1"
    configure -debug-and-release -opensource -platform win32-msvc2015 -nomake examples -nomake tests -prefix "C:\dev\persinfonet\Qt_all\Kits\Qt57MSVC2015_32bit"
    "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\nmake" install

    Nmake

    QT-seems to compile in proper manner:
    0_1525122983473_Qt_compiles_with_nmake.jpg

    There is no directory: C:\dev\persinfonet\Qt_all\Kits\Qt57MSVC2015_32bit
    0_1525123014466_Qt57MSVC2015_32bit .jpg

    92 qt applications (executables):

    0_1525123065460_qt_executables.jpg


  • Lifetime Qt Champion

    What if you use jom.exe install ?



  • @SGaist
    0_1525163001252_jom_get_source.jpg

    I put in my system path:
    C:\dev\persinfonet\qt5\qtbase\bin
    C:\dev\persinfonet\jom\bin

    0_1525163012688_jom_qmake.jpg

    I see Jomd.exe application:

    0_1525163056239_jom_applications.jpg

    Jomd doesnot work because jomd uses qt dll's, which have to be build by compiling QT.

    "Workaround": I should compile with nmake. After nmake compiling, i must copy QT exe and dll files to another place ("C:\dev\persinfonet\Qt_all\Kits\Qt57MSVC2015_32bit" ?)

    0_1525163230157_jomd_make_qt.jpg


  • Lifetime Qt Champion

    Jom is already provided with Qt, somewhere under the Qt Creator folder.



  • @SGaist said in vs2015 errors with (git) source code:

    Jom is already provided with Qt, somewhere under the Qt Creator folder.

    I like to compile QT from source. N.B. If I use windows QT installer i will get jom.exe

    I did execute the commands:
    jomd
    jomd install

    0_1525215276133_jomd_install.jpg

    Now i get the Qt57MSV2015_32bit directory. Maybe i forgot "nmake install" in the nmake solution.


Log in to reply