From: root AT jacob DOT remcomp DOT fr (root) Subject: Re: Calling Borland routines 5 Jun 1997 21:01:08 -0700 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: Content-Type: text Original-To: john AT jpsc DOT co DOT uk Original-Cc: gnu-win32 AT cygnus DOT com In-Reply-To: from "John Cooper" at Jun 4, 97 01:07:15 am Original-Sender: owner-gnu-win32 AT cygnus DOT com > > 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 AT cygnus DOT com" with one line of text: "help".