简体   繁体   中英

Where should I include .dll files from bin folder in libraries?

To use C++ libraries we need to copy .dll files from bin folder, we are either instructed to paste them in the project directory OR in C:/windows32/ .

Does it matter where we paste .dll files besides the scope of accessibility?

It's a very bad idea to write files to the system directory if you have an alternative. (And if you did need to, you'd check the environment variables instead of hardcoding.)

At best, no other program will install a library by the same name, so you'll have a bit of extra junk in your system directory. It can't be removed when you uninstall the program, because it was never registered and you have no way of knowing if some other application needs it.

At worst, two different programs will install different versions of FOO.DLL and one of them will break. This is affectionately known as “DLL Hell,” and the solution was for everyone to put their DLLs in the project directory. (Or sometimes, the vendor's Common Files.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM