   Linking with the correct library (Visual C++)
  Hello,I'm developing a simple game which uses the DevIL image library. I'm using Visual C++ (Express).To link with the library I compile the game with devil.lib and at runtime the game searches for devil.dll. (The DLL is in the main game directory)My problem is that some other Program (no idea which one) keeps placing a "devil.dll" in the WINDOWS/system32 folder. This DLL is older than mine and gets loaded instead of the one in the game folder. It gives me an error like "_iFlipBuffer@16 was not found in DevIL.dll" when the game starts.I can delete the devil.dll in the system32 folder to make it work again. But is there a possibility to tell Visual C++ not to load the library from system32 but from my game folder?Maybe I can configure it in the Linker section? Or is it something with the manifest?Thank you!aeroz   
  Perhaps this article from MSDN can help you.   ;  Thank you for the fast answer!What is strange about this is that the first search path according to the link is "The directory where the executable module for the current process is located". But in my case it loads the DLL in the Windows system directory and not the one in the game directory.But I found out that when I execute the game manually it loads the correct DLL. (Actually the exe isn't located in the game folder, it's in a separate Debug folder and I specified in VC++ another "Working Directory" where the game data and DLLs are)When I run it from VC++ it doesn't work, when I put the exe in the game directory and run it from there it works.For me it isn't a problem deleting the devil.dll from the system32 folder, I just wanted to be sure that the game works on a client PC that also has an older devil.dll in the system folder. Now the problem is solved! Thank you!aeroz   