About using DLL files in projects
-
Hi everybody! This is my question (may be a very unprofessional one): when I make a project in Visual Studio and add a reference to some dll file and complete the project( by here every thing is OK!),so the program runs in my system as I want,BUT! as you know if I want to pick the project up and run it in another system so I should add and reference the dlls again. Is there some professional way to add dlls once and the program could be run on every system whitout being worry about adding dlls? thanks in advance
-
Hi everybody! This is my question (may be a very unprofessional one): when I make a project in Visual Studio and add a reference to some dll file and complete the project( by here every thing is OK!),so the program runs in my system as I want,BUT! as you know if I want to pick the project up and run it in another system so I should add and reference the dlls again. Is there some professional way to add dlls once and the program could be run on every system whitout being worry about adding dlls? thanks in advance
You have to distribute the dll's with your application. The best way to distribute your app is in general to provide an installer that will do all those kind of tasks for you (and even more). You can for example take a look at InnoSetup[^], which is free.
Cédric Moonen Software developer
Charting control [v1.3] -
Hi everybody! This is my question (may be a very unprofessional one): when I make a project in Visual Studio and add a reference to some dll file and complete the project( by here every thing is OK!),so the program runs in my system as I want,BUT! as you know if I want to pick the project up and run it in another system so I should add and reference the dlls again. Is there some professional way to add dlls once and the program could be run on every system whitout being worry about adding dlls? thanks in advance
It's not unprofessional, it just shows that you don't quite get the point of using a DLL versus a static library. some of the differences are: for a DLL: 1) seperate storage from exe 2) multiple exes use the same code 3) to update, change one file 4) usable by exes created with different compilers for a static lib: 1) built into exe 2) each exe uses the built-in code 3) to update, each exe must relink 4) exe must use same compiler as lib (usually) Only you can decide which is appropriate for your project. Judy
-
It's not unprofessional, it just shows that you don't quite get the point of using a DLL versus a static library. some of the differences are: for a DLL: 1) seperate storage from exe 2) multiple exes use the same code 3) to update, change one file 4) usable by exes created with different compilers for a static lib: 1) built into exe 2) each exe uses the built-in code 3) to update, each exe must relink 4) exe must use same compiler as lib (usually) Only you can decide which is appropriate for your project. Judy
JudyL_FL wrote:
It's not unprofessional, it just shows that you don't quite get the point of using a DLL versus a static library. some of the differences are: for a DLL: 1) seperate storage from exe 2) multiple exes use the same code 3) to update, change one file 4) usable by exes created with different compilers for a static lib: 1) built into exe 2) each exe uses the built-in code 3) to update, each exe must relink 4) exe must use same compiler as lib (usually)
Wow :omg: , I finally learned something that I did not intend to :) . Just kidding, I am working on a large project and now I know why we are in DLL-hell. Your explanation was great.
Michael If we knew what it was we were doing, it would not be called research, would it? --Albert Einstein