Message-ID: <36BA0160.3723@bergen.mail.telia.com> From: John Kismul X-Mailer: Mozilla 3.04 (Win95; I) MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Linking COFF files References: <36B9C667 DOT 16D AT bergen DOT mail DOT telia DOT com> <79cs0n$2hh$1 AT nnrp1 DOT dejanews DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 18 Date: Thu, 04 Feb 1999 21:21:52 +0100 NNTP-Posting-Host: 195.204.238.1 X-Complaints-To: abuse AT telia DOT no X-Trace: news.telia.no 918159638 195.204.238.1 (Thu, 04 Feb 1999 21:20:38 CET) NNTP-Posting-Date: Thu, 04 Feb 1999 21:20:38 CET Organization: Telia Internet Public Access To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com silkwodj AT my-dejanews DOT com wrote: > > Boy, John are you in luck! > > Everyone else is worried about ELF's PE's and I don't know what else (I still > would like to know though). Your COFF object should have an .o extension. > Just add it to the list of sources being fed to gcc. - Make sure you have > your functions prototyped as extern. - Assure your functions will be > declared as Global in your other source. - Function names have to look like > what the compiler expects, so a prefixed underscore must be assured. - If > you are compiling as c++ you must also assure name mangling will be > accomodated. The easiest way is usually to prototype the function(s) as > extern "C" to eliminate this need. > > BTW if you are linking with NASM there is a good tutorial on this. OK, and where can I find this tutorial?