Skip to content

Instantly share code, notes, and snippets.

@awesomebjt
Created March 10, 2021 16:44
Show Gist options
  • Save awesomebjt/b87d50c5de8a7d952c7d98f52e503123 to your computer and use it in GitHub Desktop.
Save awesomebjt/b87d50c5de8a7d952c7d98f52e503123 to your computer and use it in GitHub Desktop.
Fixing "pthread or dependencies not loaded" error in Visual Studio Code with the Haskell extension

After installing the Haskell extension for VSCode in Windows 10, I kept getting an error message that included the text:

user specified .o/.so/.DLL could not be loaded (addDLL: pthread or dependencies not loaded. (Win32 error 5)) Whilst trying to load: (dynamic) pthread

This StackOverflow question gave me the correct answer.

I found C:\Windows\System32\pthread.dll and changed its permissions to allow my user read and execute access. By default it was only available to administrators for some reason, and completely blocked for everyone else.

After changing this, the Haskell extension started working perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment