This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Calling Borland routines


> 
> 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
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]