From: "Chris Bilson" Newsgroups: comp.os.msdos.djgpp Subject: Re: DLL in djgpp??? Date: Wed, 25 Feb 1998 08:17:32 +0800 Organization: DCI HiNet Lines: 41 Message-ID: <6cvneo$74q@netnews.hinet.net> References: <34F1C6C8 DOT 693E AT cam DOT org> NNTP-Posting-Host: h27.s11.ts30.hinet.net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I think the question here should be do we need to use DLLs in DOS. I think that the main reason DLLs were designed was that in Windows (or any other multitasking OS, really) you might have many different apps using the same functions and code. Instead of static linking everything, and having multiple copies of the same code in memory at any one time, we can put this stuff in DLLs and share it. In my experience the only kinds of fucntions (besides the kinds listed above) that I would really want to put into a DLL would be stuff that I might or might not use. Fo example, if I wrote two versions of a function, one for 486/Pentium CPUs, and one for MMX CPUs, and dertemine at run time which type of CPU I am running on, I don't bother to load the other function. However, thes types of functions are usually fairly small (usually assembly), and the memory that is used by my code is usually not a major concern for my programs. Actually all Windows does is load the code into a code segment and give you the address. That shouldn't be that hard to implement by yourself, really. Take a look at the Windows SDK if you are interested in how they did it, or better yet, look around at the abundance of GNU and other free-ware available on the Net, usually with source-code, and you should be able to work it out. Chris Bilson chrisb AT NOSPAMms12 DOT hinet DOT net Vic wrote <34F1C6C8 DOT 693E AT cam DOT org>... >Salvador Eduardo Tropea (SET) wrote: >> But I don't know if you really need it because just using libraries you only >> need to relink your project, not to recompile. >about using DLLs in DOS... I think I saw a couple of games that were 32 >bit (watcom I think) for DOS and had DLLs into the directory (like for >sound and graphix drivers). Would it be possible to make DJGPP work with >DLLs? >-- >--> http://www.cam.org/~tudor <--