![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: Mar 2005
Posts: 220
Rep Power: 4
![]() |
Question about using statements when using components
As some standards I create a lot of my classes in stand-alone DLL files and then have those as references in my programs, however some of these DLL's reference other DLL's, for example I have a DLL for error handling, and that references my Utils DLL for some basic tasks that I figured were better off in another DLL.
Now the problem is that if I generate a program that references the Error DLL I get errors if I try to generate it without referencing the Utils DLL as well? Is there any way to avoid this? I'd rather reference the Error Dll directly and have it already having compiled into itself everything it needed from the Utils DLL (does that make any sense?) What I'm worried about is that if I were to publish my error DLL for others to use, anytime they use it, they'd also need to reference the Util DLL, and then if I created another DLL that referenced the error DLL they'd need to reference that DLL, the error DLL, and the Util DLL, seems to not be quite as I'd expect. |
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
It doesn't make sense. If the Error dll contains, internally, everything it needs from the Utils dll, then that removes one reason for having the Utils dll.
When you write code that uses a library of any kind, you are going to have to choose how you make the library's code available. It MUST be available, as code, not as just references. If the dll metaphor doesn't fit your likings, then use an object library or some other method.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#3 |
|
Programmer
Join Date: Nov 2006
Location: Kosovė/Prishtinė
Posts: 47
Rep Power: 0
![]() |
I often write some custom controls, and of course I compile them as dlls and call them on my applications, but when I gave the software to somebody it was very painfull giving them all dlls with my software, and the problem was if some user deletes my dlls. So I asked my friend who knows everything (www.google.com) how to solve this problem and it came up with this: http://research.microsoft.com/~mbarnett/ILMerge.aspx
It merges assemblies and make one big exe (or dll) with all others, so you don't have to be worried if user deletes it or renames it because they all will be merged into one assembly. Check the site for more information. P.S If you want GUI part of ILMerge, check here: http://www.codeproject.com/useritems...or_ILMerge.asp I hope this helps with your problem. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Attitudes | Oddball | Coder's Corner Lounge | 29 | Mar 18th, 2006 9:34 PM |
| How to post a question | nnxion | C++ | 10 | Jun 3rd, 2005 11:53 AM |
| How to post a question | nnxion | C++ | 0 | Jun 3rd, 2005 8:55 AM |
| How to post a question | nnxion | C | 0 | Jun 3rd, 2005 8:55 AM |
| Question Marks | dmorales | Other Web Development Languages | 3 | May 19th, 2005 11:12 AM |