Where should i put dll file(that i use in my project)

后端 未结 5 1585
栀梦
栀梦 2021-02-19 21:16

Im setting up a svn repository and wondering where i should put the dll files.

What Ive currently done is put them in the /bin/debug folder and then link them in my pro

5条回答
  •  南方客
    南方客 (楼主)
    2021-02-19 21:53

    Dlls are only needed at runtime. For a quick fix, you may copy your dlls in the Debug folder where your .exe file is. This Debug folder is at the same level as the solution .sln file in Visual Studio. Which thing you will have to do each time you start a new project... Debug folder

    A better solution would be to copy all third party dlls, plus all the corresponding .h and .lib files, in 2 folders, say C:\dev\include and C:\dev\lib, and then add these 2 folders to your path environment variable once for all. This way, you'll be able to access them from all your projects, without having to copy them over and over.

    Now, if you want someone to be able to run your project on another computer, you'll need to copy all needed .h, .lib and .dll files in your project in a separate folders that you create, say include and lib again, in your project directory where your own program files are, as mentioned in the previous posts. Project folder

    PS. Sorry, it would not let me upload the 2 screenshots, so click on links.

提交回复
热议问题