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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
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
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?
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