# CGO and exit status 3221225781

**URL:** <https://travis-ci.community/t/cgo-and-exit-status-3221225781/2015>\
**Category:** Windows\
**Created:** [January 27, 2019, 8:29am UTC](https://travis-ci.community/t/cgo-and-exit-status-3221225781/2015 "2019-01-27T08:29:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![kivutar](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/kivutar/32/138_2.png) [@kivutar](https://travis-ci.community/u/kivutar)\
**Post date:** [January 27, 2019, 8:29am UTC](https://travis-ci.community/t/cgo-and-exit-status-3221225781/2015/1 "2019-01-27T08:29:09Z")

</div>

I’m experiencing issues linking libraries on Windows with CGO.

> <https://github.com/libretro/ludo/pull/128>

You can see some `exit status 3221225781` in the log.

This error usually happen when the Windows SDK is incomplete or not installed, according to [https://github.com/rust-lang/rust/issues/30229#issuecomment-339769458](https://github.com/rust-lang/rust/issues/30229#issuecomment-339769458)

It is clearly related to having issues finding a DLL.

Any idea how to fix this?

---

<div class="post-metadata">

**Author:** ![kivutar](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/kivutar/32/138_2.png) [@kivutar](https://travis-ci.community/u/kivutar)\
**Post date:** [January 31, 2019, 7:06am UTC](https://travis-ci.community/t/cgo-and-exit-status-3221225781/2015/2 "2019-01-31T07:06:22Z")

</div>

After further research, it appears that the program can’t find `libwinpthread-1.dll` which is supposed to be in mingw-w64 that’s already installed in Windows VMs.

---

<div class="post-metadata">

**Author:** ![kivutar](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/kivutar/32/138_2.png) [@kivutar](https://travis-ci.community/u/kivutar)\
**Post date:** [February 3, 2019, 2:33pm UTC](https://travis-ci.community/t/cgo-and-exit-status-3221225781/2015/3 "2019-02-03T14:33:04Z")

</div>

Copying `libwinpthread-1.dll` to the go source dir fixed the bug for my users, but I’m still getting these failed tests with `exit status 3221225781` on travis. Which indicates that another DLL may be missing.

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [February 3, 2019, 3:09pm UTC](https://travis-ci.community/t/cgo-and-exit-status-3221225781/2015/4 "2019-02-03T15:09:57Z")

</div>

> <https://stackoverflow.com/questions/352951/command-line-tool-to-find-dll-dependencies>

---

<div class="post-metadata">

**Author:** ![kivutar](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/kivutar/32/138_2.png) [@kivutar](https://travis-ci.community/u/kivutar)\
**Post date:** [February 4, 2019, 4:20am UTC](https://travis-ci.community/t/cgo-and-exit-status-3221225781/2015/5 "2019-02-04T04:20:51Z")

</div>

Thanks, I’ve tried depends.exe, but even on my dev env, it reports a ton of missing DLLs that I’m almost sure I don’t need. For example IESHIMS.DLL

See [https://stackoverflow.com/questions/36240215/dependency-walker-missing-dlls](https://stackoverflow.com/questions/36240215/dependency-walker-missing-dlls)

The output of depends.exe can be seen here [https://travis-ci.org/libretro/ludo/jobs/488371873](https://travis-ci.org/libretro/ludo/jobs/488371873)

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [February 4, 2019, 3:11pm UTC](https://travis-ci.community/t/cgo-and-exit-status-3221225781/2015/6 "2019-02-04T15:11:41Z")

</div>

According to [https://stackoverflow.com/questions/49148568/api-ms-win-core-dlls-missing-on-windows-10#comment85301714\_49148568](https://stackoverflow.com/questions/49148568/api-ms-win-core-dlls-missing-on-windows-10#comment85301714_49148568) :

> You mean you ran `depends.exe` ? It’s quite old and doesn’t support API sets, try [github.com/lucasg/Dependencies](https://github.com/lucasg/Dependencies)

[windows - How to check for DLL dependency? - Stack Overflow](https://stackoverflow.com/questions/7378959/how-to-check-for-dll-dependency) also suggests `dumpbin` (doesn’t check for DLL presence) and `ldd` (present in Travis as part of Git Bash environment).

* * *

See [Linking against ncurses, no package from Chocolately yet - Environments / Windows - Travis CI Community](https://travis-ci.community/t/linking-against-ncurses-no-package-from-chocolately-yet/1030/4) for what is available on a Travis Windows builder.

---

<div class="post-metadata">

**Author:** ![kivutar](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/kivutar/32/138_2.png) [@kivutar](https://travis-ci.community/u/kivutar)\
**Post date:** [March 22, 2019, 2:27pm UTC](https://travis-ci.community/t/cgo-and-exit-status-3221225781/2015/7 "2019-03-22T14:27:17Z")

</div>

I found what DLL is missing: OpenGL32.dll

Any idea how to get this on Travis?

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [March 5, 2020, 12:56pm UTC](https://travis-ci.community/t/cgo-and-exit-status-3221225781/2015/8 "2020-03-05T12:56:44Z")

</div>

> [@Make running GUI/multimedia apps available in Windows](https://travis-ci.community/t/make-running-gui-multimedia-apps-available-in-windows/1557):
>
> Trying to run some GUI tests(conda/pyqt5/pytest) inside Windows build, but apparently GUI isn’t supported on Windows Server Core. Is there any change to have GUI enabled images in the future? Or maybe I am missing something.
