How to add additional dlls to a .pro file?
am using vi开发者_开发知识库sual studio for my project, and i need to include a lib/dll in my application. i have included the lib for the same and compiles fine, however when i try to run it, gives me an error saying that it could not find the specified dll, adding this path in the env variable PATH solves the issue, but i do not want to do it everytime and across systems, how can i include this path or a workaround for the same in my .pro file itself?
Thanks in advance, this is a li'l urgent.
You have this problem because your executable and your dll are in different folders. You probably used the default visual studio setup, which uses $(IntDir) and $(OutDir) in each project folder.
Setup the OutDir for both projects (exe and dll) to be the same folder (e.g. $(SolutionDir)\Build\$(TargetName) ). This way, the binaries resulted when building the solution will be placed in the same folder (different out folders for different targets - Debug/Release).
精彩评论