# Eyelink: Cannot solve error 'Invalid MEX-file'

**URL:** <https://psychtoolbox.discourse.group/t/eyelink-cannot-solve-error-invalid-mex-file/4344>\
**Category:** Programming Help\
**Tags:** windows, eyetracking\
**Created:** [April 11, 2022, 10:11am UTC](https://psychtoolbox.discourse.group/t/eyelink-cannot-solve-error-invalid-mex-file/4344 "2022-04-11T10:11:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abiw](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@Abiw](https://psychtoolbox.discourse.group/u/Abiw)\
**Post date:** [April 11, 2022, 10:11am UTC](https://psychtoolbox.discourse.group/t/eyelink-cannot-solve-error-invalid-mex-file/4344/1 "2022-04-11T10:11:49Z")

</div>

Hi,  
I am trying to run a script on MATLAB using the psychtoolbox, but I keep getting this error - ‘Invalid MEX-file ‘C:\toolbox\Psychtoolbox\PsychBasic\MatlabWindowsFilesR2007a\Eyelink.mexw64’: The specified module could not be found.’

The mex file is right there when I go into the MatlabWindowsFiles folder, and I have installed the GStreamer runtime and vcredist. I have also tried the Dependency Walker to find missing .dll files, and everything is added to my path, but I still get the error.

I am working on a Windows 10 laptop with a 64-bit operating system and a x64-based processor. The MATLAB versions I have is R2020b.

I cannot think of anything else to try so any suggestions would be greatly appreciated.

Thank you!

---

<div class="post-metadata">

**Author:** ![dcnieho](https://avatars.discourse-cdn.com/v4/letter/d/779978/32.png) [@dcnieho](https://psychtoolbox.discourse.group/u/dcnieho)\
**Post date:** [April 11, 2022, 2:04pm UTC](https://psychtoolbox.discourse.group/t/eyelink-cannot-solve-error-invalid-mex-file/4344/2 "2022-04-11T14:04:08Z")

</div>

Have you installed the eyelink sdk?

---

<div class="post-metadata">

**Author:** ![Abiw](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@Abiw](https://psychtoolbox.discourse.group/u/Abiw)\
**Post date:** [April 11, 2022, 2:24pm UTC](https://psychtoolbox.discourse.group/t/eyelink-cannot-solve-error-invalid-mex-file/4344/3 "2022-04-11T14:24:28Z")

</div>

I have installed the psychtoolbox-3 which says it has the Eyelink toolbox features included - I cannot find a way to download the eyelink sdk (do you have a link to the page that will let me install it?)

---

<div class="post-metadata">

**Author:** ![dcnieho](https://avatars.discourse-cdn.com/v4/letter/d/779978/32.png) [@dcnieho](https://psychtoolbox.discourse.group/u/dcnieho)\
**Post date:** [April 11, 2022, 7:18pm UTC](https://psychtoolbox.discourse.group/t/eyelink-cannot-solve-error-invalid-mex-file/4344/4 "2022-04-11T19:18:28Z")

</div>

its on their support forum. You have the features (that the eyelink mex), but not its dependencies.

---

<div class="post-metadata">

**Author:** ![Kasia](https://avatars.discourse-cdn.com/v4/letter/k/f07891/32.png) [@Kasia](https://psychtoolbox.discourse.group/u/Kasia)\
**Post date:** [May 25, 2022, 9:44pm UTC](https://psychtoolbox.discourse.group/t/eyelink-cannot-solve-error-invalid-mex-file/4344/5 "2022-05-25T21:44:20Z")

</div>

Did you manage to solve this issue? I have the same problem, I also downloaded and installed eyelink sdk but the same error appears.

---

<div class="post-metadata">

**Author:** ![Kasia](https://avatars.discourse-cdn.com/v4/letter/k/f07891/32.png) [@Kasia](https://psychtoolbox.discourse.group/u/Kasia)\
**Post date:** [May 26, 2022, 1:31am UTC](https://psychtoolbox.discourse.group/t/eyelink-cannot-solve-error-invalid-mex-file/4344/6 "2022-05-26T01:31:01Z")

</div>

Nevermind, I resolved my problem - by restarting the computer 🙂 (the above solution works)
