简体   繁体   中英

Replacing a dependency DLL in Visual studio

I have a Visual Studio 2008 project which uses libcurl.dll (dynamic linking on run-time). I want to update libcurl.dll to a newer version. I manually replaced the dll in the file system, cleaned and built the solution. But during debug, the project is not able to find libcurl.dll

Edit: The new dll was built with additional dependencies from libssh2. What all changes should I make in order to use the new DLL?

What is the correct way to upgrade a DLL in Visual Studio 2008?

  • Use Dependency Walker to find any DLL related issue.
  • Check if 32-bit/64-bit system path is causing problem.
  • Check if dependent DLL is causing any problem, or if DllMain of your DLL is returning failure.

DLLs are loaded the same way as executables. They should be either in the same directory or they should be accessible with %PATH%.

Follow these guidelines and VS will find it. Most likely you messed something else.

When you are replacing DLL there is no need to rebuild.

When you buid, the header and the .lib files are used. If you new DLL has the same entries, then you can simply replace the just te DLL file and restart the app.

If your new DLL has different entries or different types of params, then you need new headers, new .lib and then you need to rebuild.

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