<p>On Linux/GCC I can use the -rpath flag to change an executables search path for shared libraries without tempering with environment variables.</p>

<p>Can this also  be accomplished on Windows? As far as I know, dlls are always searched in the executable's directory and in PATH.  </p>

<p>My scenario: I would like to put shared libraries into locations according to their properties (32/64bit/Debug/Release) without taking care of unique names. On Linux, this is easily be done via rpath, but I haven't found any way doing this on Windows yet.</p>

<p>Thanks for any hints!</p>

The search order for DLLs in Windows is described on
this page
on MSDN. If you're using
run-time dynamic linking
, you can specify the folder when you call
```
LoadLibrary
```
.