Subject: Re: Calling Borland routines
From: [email-masked] (root)

5 Jun 1997 21:01:08 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Content-Type: text
Original-To: [email-masked]
Original-Cc: [email-masked]
In-Reply-To: <[email-masked]> from "John Cooper" at Jun 4, 97 01:07:15 am
Original-Sender: [email-masked]

> 
> I have some third party components delivered as .OBJ .LIB and .DLL files - I 
> haven't yet figured if all the routines are available in all formats. How would 
> I (can I?) call routines in any or all of these files from my GCC 32 bit 
> program?
> -- 
> John Cooper, JPSC Ltd, UK.
> 
> -
1)
Dlls routines should be no problem: just do a 'LoadLibrary' and then 
GetProcAddress. This will return a function pointer to the routine you want
to call.

2)
..LIBs are probably much more difficult, since I do not think that 'ld' will
like Borland's .LIB files. Maybe, give it a try. If you do not suceed, just
extract all the object files from the library, and build a dll with them.
Then go to procedure 1 above.

3) .OBJs are OK if they do not use any intrinsics. If they do, you are
stuck, unless you extract the intrinsics from borland's libraries with tlib.
In the best case you just link them in. In the worst... you would have to
find in all libraries of borland, where are the intrinsics used (probably 
in libc.lib), and the you would have to extract the object files with the
intrinsics in them with tlib. Then you would pass all that to 'ld' and
cross (very hard) your fingers...

-- 
Jacob Navia	Logiciels/Informatique
41 rue Maurice Ravel			Tel 01 48.23.51.44
93430 Villetaneuse 			Fax 01 48.23.95.39
France
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".