From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: .O and .OBJ files Date: Wed, 09 Apr 1997 10:38:38 -0700 Organization: Two pounds of chaos and a pinch of salt Lines: 38 Message-ID: <334BD41E.657D@cs.com> References: <3 DOT 0 DOT 32 DOT 19970409212439 DOT 00690dcc AT postoffice DOT worldnet DOT att DOT net> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp106.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Gugler wrote: > > I would like to know if there is a way to convert .OBJ files from another > compiler to .O files for DJGPP. I have found code to take you DJGPP > program out of protected mode, Would that be of any help? The problem is that the two formats are largely incompatible. See the DJGPP Frequently Asked Questions list, chapters 17 and 18, for a discussion of the various problems and their possible solutions. Chapter 17 discusses the possibility of conversion of the .obj format code, and Chapter 18 discusses all the things that you have to change in order to make such code work. While I hardly qualify as an expert in the PM<->RM interface in DJGPP, I can't help but think that forcing the program out of protected mode isn't going to do anything useful, and it may very well cause all kinds of problems. For one thing, all of the library code assumes that it is running in protected mode. If you really need your 16-bit code that badly, read the FAQ chapter 17.6. Overall, the best and easiest option is usually to just port the 16-bit real mode code to 32-bit protected mode and compile it with DJGPP. Depending on what that code does, though, the porting process may not be easy. If you're trying to use graphics or interrupt handling code, you may be better off just using one of the excellent DJGPP libraries that exist for the purpose, such as GRX 2.0 and Allegro 2.2. -- John M. Aldrich * Anything that happens, happens. * Anything that, in happening, causes something else to happen, causes something else to happen. * Anything that, in happening, causes itself to happen again, happens again. * It doesn't necessarily do it in chronological order, though. --- Douglas Adams