cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/05/16:37:19

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: MS VC++ libs with DJGPP
Date: Sat, 2 Aug 1997 17:44:29 +0100
Organization: None
Distribution: world
Message-ID: <Yze1IcAtP24zEw0D@talula.demon.co.uk>
References: <12344659319966 AT onaustralia DOT com DOT au>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 36
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Tom Cook writes:
>Is it possible to use Microsoft's C/C++ libraries (legal copies, of course)
>with DJGPP? Could you just rename, say, 'graph.lib' to 'libgraph.a' and
>then link it using ld.exe? Or are Microsoft's libs incompatible with ld?
>
>If this is ridiculous please say so, if not please help.

Unfortunately, I have to say that it is fairly ridiculous :-)

Partly, the library file formats are different. Both ultimately contain
intel machine code, but the header information about which code belongs
to what functions, what data goes in what sections, etc, is different.
In theory you could from one object format to another, but I think it
would be a painful process.

More seriously, the code generated by a particular compiler usually
makes a lot of assumptions about the environment in which it will be
run. The conventions as to how function parameters and return values are
passed, and which registers a routine is allowed to clobber, are liable
to differ, and compilers also sometimes generate calls to helper
functions (for copying or setting blocks of memory, manipulating data
types not natively supported by the processor, etc) that won't be the
same between the two systems. Not to mention the fact that djgpp
programs run in protected mode, while these Microsoft libs probably
contain real mode code, which is a very different and incompatible way
of doing things...

Your best bet is probably either to obtain the sources to these
libraries and recompile them with djgpp (this is liable to require a lot
of changes to make them work), or to find other djgpp libraries that
perform the same functions.


--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
Beauty is a French phonetic corruption of a short cloth neck ornament.

- Raw text -


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