title: Getting a program only to run with certain dlls in the directory
body: <p>When, for instance, I create a program and compile it with MinGW if I delete the environment variable I need to put the dll in the directory for it to work</p>
  
  <p>ie. libgcc_s_dw2-1.dll</p>
  
  <p>without it the program will not even start.</p>
  
  <p>When developing with QT I noticed I needed another dll in the directory, it was QtCored4.dll, I was wondering how the program knows that the dll is missing?</p>
  
  <p>Also is there anyway to add something like this to a program,
  like a define statement or something?</p>
  
  <p>I need an answer that can work with C++ :)</p>