From: silkwodj AT my-dejanews DOT com Newsgroups: comp.os.msdos.djgpp Subject: Re: Linking COFF files Date: Thu, 04 Feb 1999 19:22:13 GMT Organization: Deja News - The Leader in Internet Discussion Lines: 16 Message-ID: <79cs0n$2hh$1@nnrp1.dejanews.com> References: <36B9C667 DOT 16D AT bergen DOT mail DOT telia DOT com> NNTP-Posting-Host: 205.147.228.2 X-Article-Creation-Date: Thu Feb 04 19:22:13 1999 GMT X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows 95) X-Http-Proxy: 1.0 x11.dejanews.com:80 (Squid/1.1.22) for client 205.147.228.2 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com 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. -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own