- 1 year ago
Cabal cannot find standard Windows libraries (ole32, etc)
If Cabal cannot find standard Windows libraries such as ole32
on Windows, you may need to add the directory containing these libraries to your system's LIB
environment variable. Here's how you can do it:
Open the Start menu and search for "Environment Variables".
Click on "Edit the system environment variables".
In the System Properties window, click on the "Environment Variables" button.
In the Environment Variables window, scroll down to the "System variables" section and find the "LIB" variable.
Click "Edit" to open the Edit Environment Variable dialog box.
Add the directory containing the missing libraries to the list of directories in the "Variable value" field. Make sure to separate the directory from the other directories with a semicolon.
For example, if your missing library is in the
C:\Windows\System32
directory, you would addC:\Windows\System32;
to the "Variable value" field.Click "OK" to close the Edit Environment Variable dialog box.
Click "OK" again to close the Environment Variables window.
Restart any open command prompt or terminal windows for the changes to take effect.
After you've added the directory containing the missing libraries to the LIB
environment variable, Cabal should be able to find them and compile your Haskell program without issue.