[GH-ISSUE #270] How-to: Build libxlsxwriter inside Qt-Creator for Windows #216

Closed
opened 2026-05-05 11:57:12 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @petricf on GitHub (Jan 21, 2020).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/270

Originally assigned to: @jmcnamara on GitHub.

This guide is dated January 21st, 2020.

Assumptions:

  • Qt is/will be installed to C:\Qt
  • Project directory (location of unpacked zlib and libxlsxwriter) is C:\Projects
  • Install destination of compiled zlib will be C:\Qt\Tools\zlib(32/64)
  • Install destination of compiled libxlsxwriter will be C:\Qt\Tools\xlsxwriter(32/64)

Prerequisites:

  • Installed Qt + Qt-Creator, selected packages:Qt-Installation
  • Downloaded source of zlib (currently zlib1211.zip)
  • Downloaded source of libxlsxwriter

Procedure:

  • Unpack the sources (zlib and libxlsxwriter) to C:\Projects.

  • Start Qt-Creator

  • Create a session for zlib (Menu: File -> Sessions -> Manage ...) and open it

  • Open C:\Projects\zlib-1-2-11\CMakeLists.txt (Menu: File -> Open File or Project). This dialog will appear:zlib-configure1

  • Select both compilers (MinGW 32-bit and 64-bit) and press "Configure Project"

  • At the left navigation bar select "Projects"

  • Change "Edit build configuration to "Release" and adjust the install paths of the 32-bit settings to C:\Qt\Tools\zlib32... :zlib-configure2 Don't forget to press "Apply Configuration Changes".

  • Configure Run settings and add deployment step for 32-bit:zlib-configure3

  • This will be added:zlib-configure4

  • Enable AMD64 switch and adjust install paths of the 64-bit settings to C:\Qt\Tools\zlib64... :zlib-configure5 Verify that the variabled INSTALL_xxx are also adjusted. Select "Apply Configuration Changes" when done.

  • Add the deployment step to the run configuration:zlib-configure6

  • At the left navigation bar select "the run configuration for 64-bit (should be already selected):zlib-run1

  • Run the project (green arrow/triangle at the left navigation bar). This should deploy the 64-bit zlib to C:\Qt\Tools\zlib64.

  • At the left navigation bar select "the run configuration for 32-bit:zlib-run2

  • Run the project (green arrow/triangle at the left navigation bar). This should deploy the 64-bit zlib to C:\Qt\Tools\zlib64.

  • zlib build and deployment is finished now.

  • Create a session for libxlsxwriter (Menu: File -> Sessions -> Manage ...) and open it

  • Open C:\Projects\libxlsxwriter-RELEASE_0.9.3\CMakeLists.txt (Menu: File -> Open File or Project):libxlsxwriter-configure1 Select both compilers (MinGW 32-bit and 64-bit) and press "Configure Project"

  • At the left navigation bar select "Projects" and select "Desktop Qt ... MinGW 32-bit -> Build"

  • Change "Edit build configuration to "Release". Add Directory to zlib root (32-bit version):libxlsxwriter-configure2 Select "Apply Configuration Changes"

  • Adjust options and deployment destination for the 32-bit version of the library: libxlsxwriter-configure3
    libxlsxwriter-configure5
    Select "Apply Configuration Changes"

  • If the path referred in Issue #269 is applied the option USE_DOUBLE_FUNCTION is also listed. If you are on a none US locale this should be enabled also.

  • Configure Run settings and add deployment step for 32-bit like done for zlib above

  • At the left navigation bar select "Projects" and select "Desktop Qt ... MinGW 64-bit -> Build"

  • Change "Edit build configuration to "Release". Add Directory to zlib root (64-bit version): libxlsxwriter-configure4 Select "Apply Configuration Changes"

  • Adjust options and deployment destination for the 64-bit version of the library: libxlsxwriter-configure5 Select "Apply Configuration Changes"

  • If the path referred in Issue #269 is applied the option USE_DOUBLE_FUNCTION is also listed. If you are on a none US locale this should be enabled also.

  • Configure Run settings and add deployment step for 64-bit like done for zlib above

  • select the 32-bit run configuration like done for zlib above.

  • Run the project (green arrow/triangle at the left navigation bar). This should deploy the 32-bit libxlsxwriter to C:\Qt\Tools\xlsxwriter32. A dialog pops up asking for run parameters. cancel it.

  • select the 64-bit run configuration like done for zlib above.

  • Run the project (green arrow/triangle at the left navigation bar). This should deploy the 64-bit libxlsxwriter to C:\Qt\Tools\xlsxwriter64. A dialog pops up asking for run parameters. cancel it.

libxlsxwriter build and deployment is finished now.

zlib is now deployed to C:\Qt\Tools\zlib32 and C:\Qt\Tools\zlib64
libxlsxwriter is now deployed to C:\Qt\Tools\xlsxwriter32 and C:\Qt\Tools\xlsxwriter64

Use ...32 for 32-bit applications and ...64 for 64-bit applications.

Originally created by @petricf on GitHub (Jan 21, 2020). Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/270 Originally assigned to: @jmcnamara on GitHub. This guide is dated January 21st, 2020. Assumptions: - Qt is/will be installed to C:\Qt - Project directory (location of unpacked zlib and libxlsxwriter) is C:\Projects - Install destination of compiled zlib will be C:\Qt\Tools\zlib(32/64) - Install destination of compiled libxlsxwriter will be C:\Qt\Tools\xlsxwriter(32/64) Prerequisites: - Installed Qt + Qt-Creator, selected packages:![Qt-Installation](https://user-images.githubusercontent.com/30858197/72785395-7573b900-3c2b-11ea-8d00-572f62172235.png) - Downloaded source of zlib (currently zlib1211.zip) - Downloaded source of libxlsxwriter Procedure: - Unpack the sources (zlib and libxlsxwriter) to C:\Projects. - Start Qt-Creator - Create a session for zlib (Menu: File -> Sessions -> Manage ...) and open it - Open C:\Projects\zlib-1-2-11\CMakeLists.txt (Menu: File -> Open File or Project). This dialog will appear:![zlib-configure1](https://user-images.githubusercontent.com/30858197/72786436-e5833e80-3c2d-11ea-8b12-31290bf19efa.png) - Select both compilers (MinGW 32-bit and 64-bit) and press "Configure Project" - At the left navigation bar select "Projects" - Change "Edit build configuration to "Release" and adjust the install paths of the 32-bit settings to C:\Qt\Tools\zlib32\... :![zlib-configure2](https://user-images.githubusercontent.com/30858197/72789385-fc2c9400-3c33-11ea-8a54-bd1b1c7a22d2.png) Don't forget to press "Apply Configuration Changes". - Configure Run settings and add deployment step for 32-bit:![zlib-configure3](https://user-images.githubusercontent.com/30858197/72787602-883cbc80-3c30-11ea-83c7-f4c8c124f1e4.png) - This will be added:![zlib-configure4](https://user-images.githubusercontent.com/30858197/72787895-1add5b80-3c31-11ea-9df2-7f144ae636fb.png) - Enable AMD64 switch and adjust install paths of the 64-bit settings to C:\Qt\Tools\zlib64\... :![zlib-configure5](https://user-images.githubusercontent.com/30858197/72789828-b4f2d300-3c34-11ea-842f-6cdad817e5bc.png) Verify that the variabled INSTALL_xxx are also adjusted. Select "Apply Configuration Changes" when done. - Add the deployment step to the run configuration:![zlib-configure6](https://user-images.githubusercontent.com/30858197/72790223-81647880-3c35-11ea-920a-4b6417747632.png) - At the left navigation bar select "the run configuration for 64-bit (should be already selected):![zlib-run1](https://user-images.githubusercontent.com/30858197/72790537-149dae00-3c36-11ea-98b1-0be1041cd045.png) - Run the project (green arrow/triangle at the left navigation bar). This should deploy the 64-bit zlib to C:\Qt\Tools\zlib64. - At the left navigation bar select "the run configuration for 32-bit:![zlib-run2](https://user-images.githubusercontent.com/30858197/72790865-a4dbf300-3c36-11ea-8def-b2a285a872f9.png) - Run the project (green arrow/triangle at the left navigation bar). This should deploy the 64-bit zlib to C:\Qt\Tools\zlib64. - zlib build and deployment is finished now. - Create a session for libxlsxwriter (Menu: File -> Sessions -> Manage ...) and open it - Open C:\Projects\libxlsxwriter-RELEASE_0.9.3\CMakeLists.txt (Menu: File -> Open File or Project):![libxlsxwriter-configure1](https://user-images.githubusercontent.com/30858197/72791505-bb367e80-3c37-11ea-9c44-a53a4d1dabb2.png) Select both compilers (MinGW 32-bit and 64-bit) and press "Configure Project" - At the left navigation bar select "Projects" and select "Desktop Qt ... MinGW 32-bit -> Build" - Change "Edit build configuration to "Release". Add Directory to zlib root (32-bit version):![libxlsxwriter-configure2](https://user-images.githubusercontent.com/30858197/72792030-9abaf400-3c38-11ea-938e-cc40a6897665.png) Select "Apply Configuration Changes" - Adjust options and deployment destination for the 32-bit version of the library: ![libxlsxwriter-configure3](https://user-images.githubusercontent.com/30858197/72794672-adcfc300-3c3c-11ea-89eb-69b26ebbc969.png) ![libxlsxwriter-configure5](https://user-images.githubusercontent.com/30858197/72795122-64cc3e80-3c3d-11ea-807a-41a990c629bd.png) Select "Apply Configuration Changes" - If the path referred in Issue #269 is applied the option USE_DOUBLE_FUNCTION is also listed. If you are on a none US locale this should be enabled also. - Configure Run settings and add deployment step for 32-bit like done for zlib above - At the left navigation bar select "Projects" and select "Desktop Qt ... MinGW 64-bit -> Build" - Change "Edit build configuration to "Release". Add Directory to zlib root (64-bit version): ![libxlsxwriter-configure4](https://user-images.githubusercontent.com/30858197/72793639-000fe480-3c3b-11ea-8ed6-e86f8c6ce28d.png) Select "Apply Configuration Changes" - Adjust options and deployment destination for the 64-bit version of the library: ![libxlsxwriter-configure5](https://user-images.githubusercontent.com/30858197/72795163-701f6a00-3c3d-11ea-9601-2bad346a295f.png) Select "Apply Configuration Changes" - If the path referred in Issue #269 is applied the option USE_DOUBLE_FUNCTION is also listed. If you are on a none US locale this should be enabled also. - Configure Run settings and add deployment step for 64-bit like done for zlib above - select the 32-bit run configuration like done for zlib above. - Run the project (green arrow/triangle at the left navigation bar). This should deploy the 32-bit libxlsxwriter to C:\Qt\Tools\xlsxwriter32. A dialog pops up asking for run parameters. cancel it. - select the 64-bit run configuration like done for zlib above. - Run the project (green arrow/triangle at the left navigation bar). This should deploy the 64-bit libxlsxwriter to C:\Qt\Tools\xlsxwriter64. A dialog pops up asking for run parameters. cancel it. libxlsxwriter build and deployment is finished now. zlib is now deployed to C:\Qt\Tools\zlib32 and C:\Qt\Tools\zlib64 libxlsxwriter is now deployed to C:\Qt\Tools\xlsxwriter32 and C:\Qt\Tools\xlsxwriter64 Use ...32 for 32-bit applications and ...64 for 64-bit applications.
gitea-mirror 2026-05-05 11:57:12 -06:00
  • closed this issue
  • added the
    docs
    label
Author
Owner

@jmcnamara commented on GitHub (Jul 30, 2020):

I've added a link to your QT guide from the libxlsxwriter docs: https://libxlsxwriter.github.io/getting_started.html#gsg_qt

<!-- gh-comment-id:666783455 --> @jmcnamara commented on GitHub (Jul 30, 2020): I've added a link to your QT guide from the libxlsxwriter docs: https://libxlsxwriter.github.io/getting_started.html#gsg_qt
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/libxlsxwriter#216
No description provided.