# PackageCompiler fails on example, windows/mingw

**URL:** <https://discourse.julialang.org/t/packagecompiler-fails-on-example-windows-mingw/44210>\
**Category:** General Usage\
**Created:** [August 3, 2020, 5:36pm UTC](https://discourse.julialang.org/t/packagecompiler-fails-on-example-windows-mingw/44210 "2020-08-03T17:36:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![smthzch](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@smthzch](https://discourse.julialang.org/u/smthzch)\
**Post date:** [August 3, 2020, 5:36pm UTC](https://discourse.julialang.org/t/packagecompiler-fails-on-example-windows-mingw/44210/1 "2020-08-03T17:36:40Z")

</div>

I am getting an error from mingw of missing files when running create\_app on the demo application for PackageCompiler found [MyApp](https://github.com/JuliaLang/PackageCompiler.jl/tree/master/examples/MyApp)

Specifically:

```julia
julia> using PackageCompiler

julia> create_app("MyApp", "MyCompiledApp")
[ Info: PackageCompiler: creating base system image (incremental=false)...
[ Info: PackageCompiler: creating system image object file, this might take a while...
c:\mingw-w64\mingw64\bin/ld.exe: cannot find dllcrt2.o: No such file or directory
c:\mingw-w64\mingw64\bin/ld.exe: cannot find -lmingw32
c:\mingw-w64\mingw64\bin/ld.exe: cannot find -lgcc_s
c:\mingw-w64\mingw64\bin/ld.exe: cannot find -lmoldname
c:\mingw-w64\mingw64\bin/ld.exe: cannot find -lmingwex
c:\mingw-w64\mingw64\bin/ld.exe: cannot find -lmsvcrt
c:\mingw-w64\mingw64\bin/ld.exe: cannot find -lpthread
c:\mingw-w64\mingw64\bin/ld.exe: cannot find -ladvapi32
c:\mingw-w64\mingw64\bin/ld.exe: cannot find -lshell32
c:\mingw-w64\mingw64\bin/ld.exe: cannot find -luser32
c:\mingw-w64\mingw64\bin/ld.exe: cannot find -lkernel32
c:\mingw-w64\mingw64\bin/ld.exe: cannot find -liconv
c:\mingw-w64\mingw64\bin/ld.exe: cannot find -lmingw32
c:\mingw-w64\mingw64\bin/ld.exe: cannot find -lgcc_s
c:\mingw-w64\mingw64\bin/ld.exe: cannot find -lmoldname
c:\mingw-w64\mingw64\bin/ld.exe: cannot find -lmingwex
c:\mingw-w64\mingw64\bin/ld.exe: cannot find -lmsvcrt
collect2.exe: error: ld returned 1 exit status

```

I am on Windows 10. I have tried this with different compilers, mingw-64, mingw-64 from winbuilds, 32-bit mingw (different error) and let PackageCompiler download and install mingw64 on its own.

---

<div class="post-metadata">

**Author:** ![smthzch](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@smthzch](https://discourse.julialang.org/u/smthzch)\
**Post date:** [August 4, 2020, 2:36pm UTC](https://discourse.julialang.org/t/packagecompiler-fails-on-example-windows-mingw/44210/2 "2020-08-04T14:36:48Z")

</div>

I was able to get it working. I had to remove all existing compilers (mingw, cygwin) from my path, remove library\_path env variables, and delete the artifact from .julia that contained the mingw compiler. This caused julia to redownload the compiler with all the libraries needed.
