# Compile vtk-9.1 with mingw-Error, "file too big"

**URL:** https://discourse.vtk.org/t/compile-vtk-9-1-with-mingw-error-file-too-big/7590
**Category:** Support
**Tags:** proposal
**Created:** [January 7, 2022, 7:18am UTC](https://discourse.vtk.org/t/compile-vtk-9-1-with-mingw-error-file-too-big/7590 "2022-01-07T07:18:28Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![rockydut](https://discourse.vtk.org/user_avatar/discourse.vtk.org/rockydut/32/4261_2.png) [@rockydut](https://discourse.vtk.org/u/rockydut)
#### Post date: [January 7, 2022, 7:18am UTC](https://discourse.vtk.org/t/compile-vtk-9-1-with-mingw-error-file-too-big/7590/1 "2022-01-07T07:18:28Z")

</div>

When I compile VTK-9.1 by mingw.  
I selected the vtkm.  
The compiler said: UnknownArrayHandle.cxx.obj: too many sections (79466)  
UnknownArrayHandle.cxx.obj: ‘file too big’.

So, how to compile it correctly?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [January 7, 2022, 12:32pm UTC](https://discourse.vtk.org/t/compile-vtk-9-1-with-mingw-error-file-too-big/7590/2 "2022-01-07T12:32:02Z")

</div>

The `-mbig-obj` flag needs passed to handle this. See usage in `Common/Misc/CMakeLists.txt` and a similar approach will be needed in `ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/CMakeLists.txt`.

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [January 7, 2022, 7:54pm UTC](https://discourse.vtk.org/t/compile-vtk-9-1-with-mingw-error-file-too-big/7590/3 "2022-01-07T19:54:24Z")

</div>

Is that MinGW or MinGW64? Despite the name similarity, these are two different projects. The former does not support 64-bit, so @ben.boeckel 's solution likely won’t work. You have to use the latter to have full 64-bit support. Either that or resorting to Visual Studio Community which is a good non-POSIX 64-bit alternative for non-commercial applications on Windows.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [January 8, 2022, 1:19am UTC](https://discourse.vtk.org/t/compile-vtk-9-1-with-mingw-error-file-too-big/7590/4 "2022-01-08T01:19:31Z")

</div>

`MINGW` just means a MinGW toolchain is in use.
