Visual Studio 2010: dll missing

[亡魂溺海] 提交于 2019-12-04 03:43:47

问题


I googled for a whole day and I'm goin' mad..

Well, that's my problem: I've written my vs project, I've specified all the "include" (by selecting project properties -> configuration properties -> VC++ directories) and all the extern libraries directories (in the same way). Then I specified all the additional libraries by selecting project properties -> Linker -> input -> Additional Dependencies and adding all the .lib files paths. I press F7, it compiles with no errors. I run the project and.. System Error: libsndfile-1.dll is missing.

That's okay, so I opened the vs console, I moved to libsndfile-1.def (and libsndfile-1.lib) path and I executed: "lib.exe libsndfile.def". Here I got another error: "LINK: fatal error lnk1104 lib.exe, impossible to open libsndfile.lib"

I tried to download libsndfile.dll from web but it still don't works. I've also tried to put all the libraries in my source files in visual studio.. but again, no way.

Where am I wrong?

Thank you in advance

EDIT: I've seen that vs doesn't find the other dll also!


回答1:


Please do not copy the DLL into the folder... this is annoying for other developers in your organisation; instead right-click your app and click properties, go into the Configuration Properties->Debugging and set the Environment value to:

PATH=C:\PathToInclude;%PATH%

this will add the path to your environment and merge it to your application environment.

Do that for all Configurations of your app.




回答2:


I solved simply placing all the dll files in the same directory of the .exe file



来源:https://stackoverflow.com/questions/12767820/visual-studio-2010-dll-missing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!