It is also assumed that we are working on the 32 bits version.
If you are working with the 64 bits version, adapt the instructions to use a **MING64** shell (`C:\msys64\mingw64.exe`) and, if needed, use `C:\msys64\mingw64\bin` in your PATH instead of `C:\msys64\mingw32\bin`.
__To be able to run my oF application by double clicking on it.__
To run, the application needs to have the dll it was compiled with.
If the required dll is not found at the location of your application, Windows will traverse the folders in your PATH to find it.
If `C:\msys64\mingw32\bin` is included in your PATH, it will hopefully find the right dll.
However, it may find a dll with a matching name in a different folder that is not compatible...
It may also happen that, after an MSYS2 update, it finds a newer version in `C:\msys64\mingw32\bin` that is also incompatible...
The solution is to copy all the needed dlls in the application folder.
This can be easily done with the command :
```sh
make copy_dlls
```
This will also ease the installation of the application on a different computer....
__To compile oF in IDE (Qt Creator or VS Code )__
These softwares will try to detect compiler programs (gcc, make) by scanning the PATH variable.
So it's an easy way to setup up your IDE.
There may also be some settings in the IDE to configure where to find the programs.
That gives you better control.
As in the previous point, relying on the PATH variable to find the programs may result in unexpected behaviours (for example, using Windows C:\Windows\System32\find.exe instead of MSYS2 C:\msys64\usr\bin\find.exe)
It may be interesting to write a wrapper batch file to lauch your IDE where you set the PATH to use.
This way you do not pollute your PATH system-wide.
### I've decided to use the PATH variable. How do I set it ?
You can find how to set the PATH in windows here: http://www.computerhope.com/issues/ch000549.htm
You'll need to add `c:\msys64\mingw32\bin` and `c:\msys64\usr\bin` to your PATH in **that order**.
There are two ways:
1. Either add them via 'Environment Variables' from the Control Panel > System > Advanced System Settings.
2. Or you can also set the PATH from the command line: open a Windows cmd prompt and set you user PATH.
Windows applications compiled with msys2 need some system dlls to run. If you are going to run the application in a different machine where you don't wont to install msys2 you can run:
from the msys2 terminal and it'll copy the necessary dlls to the project bin folder. Now you can copy that bin folder to any computer and it will run right away without having to install msys2.
This is still experimental so if you find any problem please [report it on github](https://github.com/openframeworks/openFrameworks/new?title=Problem%20with%20msys2%20dlls)
- "I have a TLSv1_1_client_method missing error" when I double-click the exe ?"
The executable looks for ssleay32.dll and libeay32.dll and it first finds a version that doesn't support TLS v1.1. Often it happens with Intel iCls software. The solution is to move the your_msys2_directory\mingw32\bin path before the conflicting path. If the conflicting path is in the system PATH and you do not have administrative privileges, copy/link ssleay32.dll and libeay32.dll from your_msys2_directory\mingw32\bin to the executable folder.