Sender: nate AT cartsys DOT com Message-ID: <362FAF6B.29153F6F@cartsys.com> Date: Thu, 22 Oct 1998 15:19:23 -0700 From: Nate Eldredge X-Mailer: Mozilla 4.05 [en] (X11; I; Linux 2.0.35 i486) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: Library Creation && Dos Shells References: <004e01bdfdcb$0ded8420$33ddefcf AT chiacomp> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Chia wrote: > > >The DJGPP User Guide on www.delorie.com has a section on libraries, but > >I can't access it just now to find the URL. Check for that. > > Ok, I found that and it says to first compile my sources into object files, > but I'm not sure how to do this becuase my files are all dependent on each > other. > > The library I'm trying to make is using Allegro, and is mostly classes which > are derrived from one another. For instance the button class requires the > component class, the window class requires the panel class, etc. Each class > is in a separate file, so how do I compile them into object code? > > If I try > > gxx -c file1.cpp > > It gives me all sorts of errors becuase of these dependencies. Then it won't compile at all. Object code is independent of routines in other files, but the compiler does need to be able to see the declarations of the external stuff. You should have declarations of your classes in header files, so if you include those in the files that use those classes, things should work. If that doesn't help, post a short example of what doesn't work. -- Nate Eldredge nate AT cartsys DOT com