Re: Using LIB Files in Delphi



"Maarten Wiltink" <maarten@xxxxxxxxxxxxxxxxxx> wrote in news:46a477a2$0
$327$e4fe514c@xxxxxxxxxxxxxx:

<alanglloyd@xxxxxxx> wrote in message
news:1185183207.213499.233940@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

[...]
How can I use the LIB file under Delphi. Is there a simple approach,
or maybe I have to get a C programmer to write a DLL which wraps the
LIB file.

That's probably the simplest. Lib files are Right Out in Delphi as far
as I know.

Groetjes,
Maarten Wiltink




Alan,

Linking with C-derived object modules/libraries is something that I have,
so far, managed to avoid having to do. However, it is something that I
believe is possible - but I may be wrong.

See Delphi (7 or 2006, probably others too) Project Options - there are
options to generate C/C++ object files.

The utility coff2omf supposedly will convert LIBs to OMF. I believe (but
again am not 100% certain) that the .OBJ files that Delphi is capable of
linking in using the $L/$LINK directive are OMF.

Google throws up a number of coff/omf hits particularly wrt linking with
Python.

I for one would be interested in hearing how you get on.

Regards

Chris
.



Relevant Pages

  • Linking with a static library
    ... I use Visual C++ to build all my drivers - much easier ... start linking in static libraries, ...
    (microsoft.public.development.device.drivers)
  • Re: static dll linking
    ... A DLL, by definition, uses only dynamic linking. ... you need a lib file; Delphi neither generates nor uses lib files. ... But load-time dynamic linking is also called "static linking", ...
    (alt.comp.lang.borland-delphi)
  • Re: Name decoration Problem
    ... > "John Phillips" wrote in message ... >> Are you linking with the DLL's .lib file? ... one>>> exported function and the pertinent code pieces are: ...
    (microsoft.public.win32.programmer.ole)
  • Re: all references to "User32.dll" discarded by /OPT:REF
    ... Because you are including the .LIB file for this in your project but when ... the actual linking comes, it doesn't find any functions contained in ... > Why do I get this error message in Masm32? ...
    (alt.lang.asm)
  • Re: Buffers in Assembly (NASM)
    ... You've got a 64-bit *nix box and you're screwin' around with OMF? ... importing the dll's directly in the code is less painful then having ... create a lib file off of the dll's and linking it. ... :x> alink your.obj msvcrt.lib ...
    (comp.lang.asm.x86)