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 QtXlsxWriter with Visual Studio 2015 and Qt 5.6.1
Forum Updated to NodeBB v4.3 + New Features

Building QtXlsxWriter with Visual Studio 2015 and Qt 5.6.1

Scheduled Pinned Locked Moved Unsolved General and Desktop
18 Posts 3 Posters 9.5k Views 1 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
    mulfycrowh
    wrote on last edited by
    #1

    Does anybody succeed in Building QtXlsxWriter with VS2015 and Qt5.6.1 ?
    I downloaded the stuff from GitHub.
    Put it in C:\Qt\QtXlsxWriter.
    Created the folder C: \Qt\QtXlsxWriter-build.
    In this Folder, run qmake ..\QtXlsxWriter

    I got the Makefile.
    I run nmake and I've got fatal Errors.

    Thanks

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Did you try to build the original project or the version from @VRonin available here ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mulfycrowh
        wrote on last edited by
        #3

        Yep. I tried it.
        Same issue.
        Perhaps it's only compatible with MinGW ?

        1 Reply Last reply
        0
        • VRoninV Offline
          VRoninV Offline
          VRonin
          wrote on last edited by VRonin
          #4

          Nope, I compile it regularly with MSVC (2013 however). I'll test with 2015 and get back to you

          Edit:
          Your error seems associated with missing cstddef header which is part of the standard. this is weird

          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
          ~Napoleon Bonaparte

          On a crusade to banish setIndexWidget() from the holy land of Qt

          1 Reply Last reply
          1
          • M Offline
            M Offline
            mulfycrowh
            wrote on last edited by
            #5

            Do you have any information about the building with VS2015 ?

            1 Reply Last reply
            0
            • VRoninV Offline
              VRoninV Offline
              VRonin
              wrote on last edited by
              #6

              Due to licensing issues my company won't allow me to install MSVC2015 so I'm unable to test. Could someone other than @mulfycrowh try and compile the project in MSVC15 and tell me if they get the same problem please?

              "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
              ~Napoleon Bonaparte

              On a crusade to banish setIndexWidget() from the holy land of Qt

              M 1 Reply Last reply
              0
              • M Offline
                M Offline
                mulfycrowh
                wrote on last edited by
                #7

                Ok. No problem. Could you please tell me what you did to compiĺe with VS2013 ?

                1 Reply Last reply
                0
                • VRoninV VRonin

                  Due to licensing issues my company won't allow me to install MSVC2015 so I'm unable to test. Could someone other than @mulfycrowh try and compile the project in MSVC15 and tell me if they get the same problem please?

                  M Offline
                  M Offline
                  mulfycrowh
                  wrote on last edited by
                  #8

                  @VRonin Apparently I succeeded in Building the library. I did it in VS2015 while creating a Makefile Project.
                  It generated 2 lib files, 2 dll files, 2 exp files ...
                  I tried to link my Project with the library and it gives more than 355 LNK Errors.
                  Here is the way:
                  C/C++ > General > Additional Include Directories : Directory including the headers
                  Linker > General > Additional Library Directories : Directory including the lib files
                  Linker > Input > Additional Dependencies : I added Qt5Xlsx.lib and Qt5Xlsxd.lib

                  Could you help please

                  1 Reply Last reply
                  0
                  • VRoninV Offline
                    VRoninV Offline
                    VRonin
                    wrote on last edited by
                    #9

                    could you try via console?

                    • Download the souce code (git clone or zip download and unpack) in a folder (let's call it C:\QtXlsx )
                    • open the VS developer console (C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\Shortcuts\VS2015 x86 Native Tools Command Prompt.lnk or something similar)
                    • go in the folder where you downladed the source: cd C:\QtXlsx
                    • set up the qt environment: C:\Qt\5.7\msvc2015\bin\qtenv2.bat
                    • run qmake to prepare the makefiles: qmake
                    • run make to build the libarary: nmake
                    • run make install to install it as a module: nmake install

                    Now you should be able to use it as a qt module, in your pro file just add the lineQt += xlsx and it should work out of the box

                    "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                    ~Napoleon Bonaparte

                    On a crusade to banish setIndexWidget() from the holy land of Qt

                    M 1 Reply Last reply
                    1
                    • M Offline
                      M Offline
                      mulfycrowh
                      wrote on last edited by
                      #10

                      Sorry. It doesn't run.
                      QtSCore.lib(QtSCore.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86'

                      I also have the error in a x64 native Tools command prompt

                      1 Reply Last reply
                      0
                      • VRoninV VRonin

                        could you try via console?

                        • Download the souce code (git clone or zip download and unpack) in a folder (let's call it C:\QtXlsx )
                        • open the VS developer console (C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\Shortcuts\VS2015 x86 Native Tools Command Prompt.lnk or something similar)
                        • go in the folder where you downladed the source: cd C:\QtXlsx
                        • set up the qt environment: C:\Qt\5.7\msvc2015\bin\qtenv2.bat
                        • run qmake to prepare the makefiles: qmake
                        • run make to build the libarary: nmake
                        • run make install to install it as a module: nmake install

                        Now you should be able to use it as a qt module, in your pro file just add the lineQt += xlsx and it should work out of the box

                        M Offline
                        M Offline
                        mulfycrowh
                        wrote on last edited by
                        #11

                        @VRonin I think it would be great to compile QtXlsxWriter for 64 bits. My Project is 64 bits.

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          Because you likely started the command line for 32bit compilation. Selection the 64 bit development command line.

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          M 1 Reply Last reply
                          0
                          • SGaistS SGaist

                            Because you likely started the command line for 32bit compilation. Selection the 64 bit development command line.

                            M Offline
                            M Offline
                            mulfycrowh
                            wrote on last edited by
                            #13

                            @SGaist Thanks for Reply. Yes for sure. How can I select 64 bits.
                            I run qmake then nmake

                            VRoninV 1 Reply Last reply
                            0
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on last edited by
                              #14

                              One way is described here

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              M 1 Reply Last reply
                              0
                              • SGaistS SGaist

                                One way is described here

                                M Offline
                                M Offline
                                mulfycrowh
                                wrote on last edited by
                                #15

                                @SGaist Thanks. I take a look

                                1 Reply Last reply
                                0
                                • M mulfycrowh

                                  @SGaist Thanks for Reply. Yes for sure. How can I select 64 bits.
                                  I run qmake then nmake

                                  VRoninV Offline
                                  VRoninV Offline
                                  VRonin
                                  wrote on last edited by
                                  #16

                                  @mulfycrowh

                                  How can I select 64 bits.

                                  Instead of C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\Shortcuts\VS2015 x86 Native Tools Command Prompt select C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\Shortcuts\VS2015 x64 Native Tools Command Prompt

                                  "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                                  ~Napoleon Bonaparte

                                  On a crusade to banish setIndexWidget() from the holy land of Qt

                                  1 Reply Last reply
                                  0
                                  • M Offline
                                    M Offline
                                    mulfycrowh
                                    wrote on last edited by
                                    #17

                                    Everything runs perfectly. I would like to thank everyone for the help !
                                    I wrote a guide for the building of the library in 64 bits and VS2015.
                                    Here is the guide:

                                    FOR 64 BITS

                                    1- Download the QtXlsxWriter zip file from gitHub:
                                    https://github.com/VSRonin/QtXlsxWriter
                                    2- Unzip in C:\QtXlsx
                                    3- Open the VS2015 x64 Native Tools Command Prompt
                                    4- Type cd
                                    5- Type cd Program Files (x86)\Microsoft Visual Studio 14.0\VC
                                    6- Type vcvarsall amd64
                                    7- Type cd
                                    8- To set up the Qt environment, type cd Qt\Qt5.6.1\5.6\msvc2015_64\bin and then qtenv2
                                    9- Type cd
                                    10- Type cd QtXlsx
                                    11- Type qmake
                                    12- Type nmake

                                    DONE !

                                    TO CONFIGURE THE PROPERTIES OF YOUR PROJECT IN VS2015

                                    a- Goto C/C++ > General and, in Additional Include Directories, add C:\QtXlsx\include\QtXlsx
                                    b- Goto Linker > General and, in Additional Library Directories, add C:\QtXlsx\lib
                                    c- Goto Linker > Input. In Additional Dependencies, you had : <different options>.
                                    Add Qt5Xlsxd.lib and Qt5Xlsx.lib to get Qt5Xlsxd.lib;Qt5Xlsx.lib;<different options>
                                    d- You have to add Qt5Xlsxd.dll and Qt5Xlsx.dll to the executable folder (depending on the configuration)

                                    DONE !

                                    VRoninV 1 Reply Last reply
                                    0
                                    • M mulfycrowh

                                      Everything runs perfectly. I would like to thank everyone for the help !
                                      I wrote a guide for the building of the library in 64 bits and VS2015.
                                      Here is the guide:

                                      FOR 64 BITS

                                      1- Download the QtXlsxWriter zip file from gitHub:
                                      https://github.com/VSRonin/QtXlsxWriter
                                      2- Unzip in C:\QtXlsx
                                      3- Open the VS2015 x64 Native Tools Command Prompt
                                      4- Type cd
                                      5- Type cd Program Files (x86)\Microsoft Visual Studio 14.0\VC
                                      6- Type vcvarsall amd64
                                      7- Type cd
                                      8- To set up the Qt environment, type cd Qt\Qt5.6.1\5.6\msvc2015_64\bin and then qtenv2
                                      9- Type cd
                                      10- Type cd QtXlsx
                                      11- Type qmake
                                      12- Type nmake

                                      DONE !

                                      TO CONFIGURE THE PROPERTIES OF YOUR PROJECT IN VS2015

                                      a- Goto C/C++ > General and, in Additional Include Directories, add C:\QtXlsx\include\QtXlsx
                                      b- Goto Linker > General and, in Additional Library Directories, add C:\QtXlsx\lib
                                      c- Goto Linker > Input. In Additional Dependencies, you had : <different options>.
                                      Add Qt5Xlsxd.lib and Qt5Xlsx.lib to get Qt5Xlsxd.lib;Qt5Xlsx.lib;<different options>
                                      d- You have to add Qt5Xlsxd.dll and Qt5Xlsx.dll to the executable folder (depending on the configuration)

                                      DONE !

                                      VRoninV Offline
                                      VRoninV Offline
                                      VRonin
                                      wrote on last edited by
                                      #18

                                      @mulfycrowh said:

                                      3- Open the VS2015 x64 Native Tools Command Prompt
                                      6- Type vcvarsall amd64

                                      They are the same thing so you just need one of the two

                                      Add Qt5Xlsxd.lib and Qt5Xlsx.lib to get Qt5Xlsxd.lib;Qt5Xlsx.lib;<different options>

                                      Do not link to both lib, use the Qt5Xlsxd.lib for the debug config and Qt5Xlsx.lib for release

                                      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                                      ~Napoleon Bonaparte

                                      On a crusade to banish setIndexWidget() from the holy land of Qt

                                      1 Reply Last reply
                                      0

                                      • Login

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