# Error Compiling QCAD with Qt 5.15.2 and MinGW on Windows

**URL:** <http://forum.qcad.org/t/error-compiling-qcad-with-qt-5-15-2-and-mingw-on-windows/9116>\
**Category:** QCAD Community Edition\
**Created:** [November 14, 2024, 6:55am UTC](http://forum.qcad.org/t/error-compiling-qcad-with-qt-5-15-2-and-mingw-on-windows/9116 "2024-11-14T06:55:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ady](http://forum.qcad.org/letter_avatar_proxy/v4/letter/a/e480ec/32.png) [@ady](http://forum.qcad.org/u/ady)\
**Post date:** [November 14, 2024, 6:55am UTC](http://forum.qcad.org/t/error-compiling-qcad-with-qt-5-15-2-and-mingw-on-windows/9116/1 "2024-11-14T06:55:14Z")

</div>

**Environment:**  
Operating System: Windows 10/11  
Qt Version: 5.15.2  
MinGW Version: 8.1.0  
QCAD Version: 3.31.2.0  
**Description:**  
I am trying to compile QCAD using Qt 5.15.2 and MinGW on Windows. I have successfully run the qmake command, but when I try to build the project using mingw32-make, I encounter an error related to the header file.

**Steps to Reproduce:**  
Open Command Prompt.  
Navigate to the QCAD source directory: D:\cad\qcad.  
Run the qmake command: D:\cad\qcad\>D:/Qt/5.15.2/mingw81\_64/bin/qmake.exe -r CONFIG+=ractivated

D:\cad\qcad\>D:/Qt/Tools/mingw810\_64/bin/mingw32-make.exe -j32  
**Error Message:**

```plaintext
In file included from dxflib.rc:5:
src/dl_dxf.h:30:10: fatal error: limits: No such file or directory
 #include <limits>
          ^ ~~~~~~~
compilation terminated.
windres: preprocessing failed.
mingw32-make[4]: *** [Makefile.Release:82: D:/cad/qcad/release/dxflib_res.o] Error 1
mingw32-make[4]: Leaving directory 'D:/cad/qcad/src/3rdparty/dxflib'
mingw32-make[3]: *** [Makefile:45: release] Error 2
mingw32-make[3]: Leaving directory 'D:/cad/qcad/src/3rdparty/dxflib'
mingw32-make[2]: *** [Makefile:657: sub-dxflib-release_ordered] Error 2
mingw32-make[2]: Leaving directory 'D:/cad/qcad/src/3rdparty'
mingw32-make[1]: *** [Makefile:1118: sub-3rdparty-release_ordered] Error 2
mingw32-make[1]: Leaving directory 'D:/cad/qcad/src'
mingw32-make: *** [Makefile:457: sub-src-release_ordered] Error 2

```

**What I Have Tried:**  
1.Ensured that the MinGW bin directory (D:/Qt/Tools/mingw810\_64/bin and D:\Qt\5.15.2\mingw81\_64\bin) is added to the system PATH.  
2.Verified that the limits header file exists in the MinGW include directory (D:\Qt\Tools\mingw810\_64\lib\gcc\x86\_64-w64-mingw32\8.1.0\include\c++).  
3.Cleaned the project and rebuilt it using mingw32-make clean followed by mingw32-make.  
4.I have previously compiled QCAD using Qt 5.15.2 and MinGW on Ubuntu, and it was successful.
