Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Building Qt with MSVC 2019
Forum Updated to NodeBB v4.3 + New Features

Building Qt with MSVC 2019

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 629 Views
  • 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.
  • A Offline
    A Offline
    AaronNGray
    wrote on 6 Aug 2020, 20:06 last edited by
    #1

    I am attempting to build Qt master with VS2019.
    The x64 build failed so am using vcvars32 build.

    configure -platform win32-msvc -developer-build -opensource -nomake examples -nomake tests
    
            link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /DLL /SUBSYSTEM:WINDOWS /VERSION:5.12 /OUT:..\..\..\..\plugins\platforms\qdirect2d.dll @C:\Users\aaron\AppData\Local\Temp\qdirect2d.dll.12904.92047.jom
       Creating library ..\..\..\..\plugins\platforms\qdirect2d.lib and object ..\..\..\..\plugins\platforms\qdirect2d.exp
    qtfreetype.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_create_read_struct referenced in function _Load_SBit_Png
    qtfreetype.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_set_longjmp_fn referenced in function _Load_SBit_Png
    qtfreetype.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_create_info_struct referenced in function _Load_SBit_Png
    qtfreetype.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_read_info referenced in function _Load_SBit_Png
    qtfreetype.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_set_expand_gray_1_2_4_to_8 referenced in function _Load_SBit_Png
    qtfreetype.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_set_palette_to_rgb referenced in function _Load_SBit_Png
    qtfreetype.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_set_tRNS_to_alpha referenced in function _Load_SBit_Png
    qtfreetype.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_set_gray_to_rgb referenced in function _Load_SBit_Png
    qtfreetype.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_set_filler referenced in function _Load_SBit_Png
    qtfreetype.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_set_packing referenced in function _Load_SBit_Png
    qtfreetype.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_set_interlace_handling referenced in function _Load_SBit_Png
    qtfreetype.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_set_strip_16 referenced in function _Load_SBit_Png
    qtfreetype.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_read_update_info referenced in function _Load_SBit_Png
    qtfreetype.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_read_image referenced in function _Load_SBit_Png
    qtfreetype.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_read_end referenced in function _Load_SBit_Png
    qtfreetype.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_destroy_read_struct referenced in function _Load_SBit_Png
    qtfreetype.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_get_error_ptr referenced in function _error_callback
    qtfreetype.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_set_read_fn referenced in function _Load_SBit_Png
    qtfreetype.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_get_io_ptr referenced in function _read_data_from_FT_Stream
    qtfreetype.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_set_read_user_transform_fn referenced in function _Load_SBit_Png
    qtfreetype.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_error referenced in function _read_data_from_FT_Stream
    qtfreetype.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_get_valid referenced in function _Load_SBit_Png
    qtfreetype.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_get_IHDR referenced in function _Load_SBit_Png
    ..\..\..\..\plugins\platforms\qdirect2d.dll : fatal error LNK1120: 23 unresolved externals
    qtfreetyped.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_create_read_struct referenced in function _Load_SBit_Png
    qtfreetyped.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_set_longjmp_fn referenced in function _Load_SBit_Png
    qtfreetyped.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_create_info_struct referenced in function _Load_SBit_Png
    qtfreetyped.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_read_info referenced in function _Load_SBit_Png
    qtfreetyped.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_set_expand_gray_1_2_4_to_8 referenced in function _Load_SBit_Png
    qtfreetyped.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_set_palette_to_rgb referenced in function _Load_SBit_Png
    qtfreetyped.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_set_tRNS_to_alpha referenced in function _Load_SBit_Png
    qtfreetyped.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_set_gray_to_rgb referenced in function _Load_SBit_Png
    qtfreetyped.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_set_filler referenced in function _Load_SBit_Png
    qtfreetyped.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_set_packing referenced in function _Load_SBit_Png
    qtfreetyped.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_set_interlace_handling referenced in function _Load_SBit_Png
    qtfreetyped.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_set_strip_16 referenced in function _Load_SBit_Png
    qtfreetyped.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_read_update_info referenced in function _Load_SBit_Png
    qtfreetyped.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_read_image referenced in function _Load_SBit_Png
    qtfreetyped.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_read_end referenced in function _Load_SBit_Png
    qtfreetyped.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_destroy_read_struct referenced in function _Load_SBit_Png
    qtfreetyped.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_get_error_ptr referenced in function _error_callback
    qtfreetyped.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_set_read_fn referenced in function _Load_SBit_Png
    qtfreetyped.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_get_io_ptr referenced in function _read_data_from_FT_Stream
    qtfreetyped.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_set_read_user_transform_fn referenced in function _Load_SBit_Png
    qtfreetyped.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_error referenced in function _read_data_from_FT_Stream
    qtfreetyped.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_get_valid referenced in function _Load_SBit_Png
    qtfreetyped.lib(sfnt.obj) : error LNK2019: unresolved external symbol _png_get_IHDR referenced in function _Load_SBit_Png
    ..\..\..\..\plugins\platforms\qdirect2dd.dll : fatal error LNK1120: 23 unresolved externals
    jom: C:\Users\aaron\GitHub\qt5\qtbase\src\plugins\platforms\direct2d\Makefile.Debug [..\..\..\..\plugins\platforms\qdirect2dd.dll] Error 1120
    jom: C:\Users\aaron\GitHub\qt5\qtbase\src\plugins\platforms\direct2d\Makefile [debug-all] Error 2
    jom: C:\Users\aaron\GitHub\qt5\qtbase\src\plugins\platforms\direct2d\Makefile [release-all] Error 2
    jom: C:\Users\aaron\GitHub\qt5\qtbase\src\plugins\platforms\Makefile [sub-direct2d-make_first] Error 2
    jom: C:\Users\aaron\GitHub\qt5\qtbase\src\plugins\Makefile [sub-platforms-make_first] Error 2
    jom: C:\Users\aaron\GitHub\qt5\qtbase\src\Makefile [sub-plugins-make_first] Error 2
    jom: C:\Users\aaron\GitHub\qt5\qtbase\Makefile [sub-src-make_first] Error 2
    jom: C:\Users\aaron\GitHub\qt5\Makefile [module-qtbase-make_first] Error 2
    
    1 Reply Last reply
    0
    • A Offline
      A Offline
      AaronNGray
      wrote on 6 Aug 2020, 20:32 last edited by AaronNGray 8 Jun 2020, 20:33
      #2

      @AaronNGray said in Building Qt with MSVC 2019:

      png_create_read_struct

      Looks like I am missing libpng !
      Are there any other external libraries I need and how do I install libpng for Qt on Windows ?

      I have tried :-

      ..\qt5\configure -platform win32-msvc -developer-build -opensource -nomake examples -nomake tests -qt-zlib -qt-libjpeg -qt-libpng -qt-xcb -qt-freetype -qt-pcre -qt-harfbuzz
      
      1 Reply Last reply
      0
      • H Offline
        H Offline
        hskoglund
        wrote on 6 Aug 2020, 22:15 last edited by
        #3

        Hi, jiust tested on my Windows 7 PC, it has MSVC 2019 installed, I downloaded the source for Qt 5.12.9 using MaintenanceTool and tried your first configure command

        configure -platform win32-msvc -developer-build -opensource -nomake examples -nomake tests
        

        I had installed Perl but forgot to install Python so the build stopped when it got to Qt5Qml.dll, but all of the plugins were built, including platforms\qdirect2d.dll and platforms\qdirect2dd.dll.

        Anyway, libpng should be in the source tree already (it was in mine).
        Here's my qt_ext_libpng.pri file that was generated during the build (it's in Src\qtbase\mkspecs\modules):

        QMAKE_DEPENDS_LIBPNG_CC =
        QMAKE_DEPENDS_LIBPNG_LD =
        QMAKE_INCDIR_LIBPNG = C:/Qt/5.12.9/Src/qtbase/src/3rdparty/libpng
        QMAKE_DEFINES_LIBPNG = 
        QMAKE_LIBS_LIBPNG =
        QMAKE_LIBS_LIBPNG_DEBUG = C:/Qt/5.12.9/Src/qtbase/lib/qtlibpngd.lib
        QMAKE_LIBS_LIBPNG_RELEASE = C:/Qt/5.12.9/Src/qtbase/lib/qtlibpng.lib
        

        Do yours look like the same?

        1 Reply Last reply
        1
        • A Offline
          A Offline
          AaronNGray
          wrote on 9 Aug 2020, 14:49 last edited by AaronNGray 8 Sept 2020, 14:59
          #4

          @hskoglund said in Building Qt with MSVC 2019:

          qt_ext_libpng.pri

          Yes, and the lib's are there.

          Maybe I need to use the MaintenanceTool as I just used git and the install instructions.

          Do you mean this :- https://www.qt.io/download-qt-installer ?

          1 Reply Last reply
          0
          • H Offline
            H Offline
            hskoglund
            wrote on 9 Aug 2020, 16:26 last edited by
            #5

            Yes, use it to get the 5.12.9 source.

            1 Reply Last reply
            0

            1/5

            6 Aug 2020, 20:06

            • Login

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