delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/14/10:44:42

From: afn03257 AT freenet3 DOT afn DOT org (Daniel P Hudson)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Using Microsoft C object code with DJGPP/RHIDE
Date: 14 Jan 1997 03:02:10 GMT
Lines: 31
Message-ID: <5besvi$36s@huron.eel.ufl.edu>
References: <32DAD173 DOT 7045 AT nottingham DOT ac DOT uk>
NNTP-Posting-Host: freenet3.afn.org
NNTP-Posting-User: afn03257
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Dr Arthur Jones <arthur DOT jones AT nottingham DOT ac DOT uk> wrote:

>extern far function1( int, int, .... )

>I've tried loading the object code into a RHIDE project and compiling/
>linking the program, but it gives something like "parse error before ("
>when it gets to the header file and doesn't compile.

>Is it fundamentally possible to link MS-C object code into DJGPP? Am I
>missing the obvious, or am I trying to do the impossible?

Hmm, I'm not familiar with MSC, however, the likely hood of you
linking objects with GCC from another compiler is slim at best.
First thing first, you need to find out which format the OBJECTS
are in. Probably OMF which is BAD. If COFF is found, use MS's LINK
and disable extended dictionaries, these are MS extensions that aren't
supported by other products. Cross your fingers and prey. otherwise
compile something using the two functions and produce a map file.
Using a debugger that supports the MAP file, try to disassemble the
code to asm and use NASM to attempt to re-produce the code in COFF
format. You may need to abuse, I mean use the knowledge of
comp.lang.x86.asm to change from 16-bit to 32bit, well all except
for the one called Scott Nudds, anyway. The best thing to do would be
to call the company and ask for tech specs or src code.

 Reading this over, I noticed a vague statement. In reference to OMF, I 
 mean that MSC probably uses OMF objs which are not compatable with
 COFF obj's. I'm not sure what MSC for 32bit systems uses, but I doubt
 your using a 32Bit compiler anyway. If you are, however, and the format 
 is COFF then the rwo should be linkable assuming duplicate definitions
 and the name mangling differences of the two compilers can be over come.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019