comp.lang.ada
 help / color / mirror / Atom feed
* How to Link Borland C++ object files with GNAT
@ 1999-04-08  0:00 Dennis Quinones
  1999-04-08  0:00 ` Jerry van Dijk
  1999-04-09  0:00 ` David Botton
  0 siblings, 2 replies; 3+ messages in thread
From: Dennis Quinones @ 1999-04-08  0:00 UTC (permalink / raw)


Hello,

I have PCMCIA drivers written in Borland C++ and I am trying to link
them to
my main application written in Ada (GNAT 3.11).  Borland C++ generates
*.obj
files which are not compatible to *.o files.
Is there a way to convert the *.obj files to *.o files?
Or any other suggestions would be greatly appreacited.

thanks,
dennis






^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to Link Borland C++ object files with GNAT
  1999-04-08  0:00 How to Link Borland C++ object files with GNAT Dennis Quinones
@ 1999-04-08  0:00 ` Jerry van Dijk
  1999-04-09  0:00 ` David Botton
  1 sibling, 0 replies; 3+ messages in thread
From: Jerry van Dijk @ 1999-04-08  0:00 UTC (permalink / raw)


Dennis Quinones (dquinone@harris.com) wrote:

: I have PCMCIA drivers written in Borland C++ and I am trying to link
: them to
: my main application written in Ada (GNAT 3.11).  Borland C++ generates
: *.obj
: files which are not compatible to *.o files.
: Is there a way to convert the *.obj files to *.o files?
: Or any other suggestions would be greatly appreacited.

Well, if this is really C++ code (and not C compiled by a also C++ capable
compiler), moving from .obj to .o is the least of your worries. BC will
use its own unique way of encoding functions, exceptions, namespaces, and
such, that GNAT, of course, knows nothing about. That does not mean it cannot
be made to work, it does mean it will involve a lot of work.

I know of no way to convert from .obj to .o format (although PE includes
Coff, so this should be relatively easy to do). This assumes of course, that
you will also initialize all runtime libraries and DLL's properly yourself.

The easy way out is compile your drivers into a DLL, and then build a
GNAT style (.a) import library for it.

--
-- Jerry van Dijk | Leiden, Holland
-- Team Ada       | jdijk@acm.org
-- see http://stad.dsl.nl/~jvandyk




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to Link Borland C++ object files with GNAT
  1999-04-08  0:00 How to Link Borland C++ object files with GNAT Dennis Quinones
  1999-04-08  0:00 ` Jerry van Dijk
@ 1999-04-09  0:00 ` David Botton
  1 sibling, 0 replies; 3+ messages in thread
From: David Botton @ 1999-04-09  0:00 UTC (permalink / raw)


Take a look at the article "Using DLLs in Object Ada" at:
http://www.botton.com/ada/articles

Since GNAT 3.11p has the ability to also use regular Microsoft .obj and
.lib files (which OA uses), you might be able to swing something. I
believe the author of the article (Gordon White) has used Borland DLLs
with Ada before and he may be able to assits you also.

David Botton


Dennis Quinones wrote:

> Hello,
>
> I have PCMCIA drivers written in Borland C++ and I am trying to link
> them to
> my main application written in Ada (GNAT 3.11).  Borland C++ generates
> *.obj
> files which are not compatible to *.o files.
> Is there a way to convert the *.obj files to *.o files?
> Or any other suggestions would be greatly appreacited.
>
> thanks,
> dennis





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-04-09  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-04-08  0:00 How to Link Borland C++ object files with GNAT Dennis Quinones
1999-04-08  0:00 ` Jerry van Dijk
1999-04-09  0:00 ` David Botton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox