Menu

DLL file in ./bin instead of the ./

2008-12-24
2012-09-26
  • Benjamin Jay Young

    I'm currently compiling a program that is linking to glib.dll. Everything compiles nicely and it finishes the build. When I start the program, it says it can't find glib.dll. So I threw glib.dll into the directory where the .exe file is and it worked. However I was to be able to move glib to the ./bin directory and have the program look for it there. How can I do this?

     
    • cpns

      cpns - 2008-12-25

      The OS uses the PATH environment variable to find executables, (inlcuding DLLs), in fact any file whose filename extension is specified by the PATHEXT environment variable.

      So place the file in a path defined by PATH, or modify PATH to suit.

      Clifford

       
      • Benjamin Jay Young

        It didn't really work. I added the file to the system32 folder and I even added the bin directory to the PATH variable (I restarted and recompiled for both). I'm pretty sure that the build is look for the built dll in the same directory of it's self. Is there a parameter in the compiler that I can set to do what I need?

         
        • cpns

          cpns - 2008-12-25

          If it did not work, then you did it wrong. Simple as that. You did not say exactly what you did, so I cannot help. It has nothing to do with how the application is built, how Dev-C++ works, or how C/C++ work, it is all (and only) about how the OS works.

          Clifford

           

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.