Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to include/link C .lib files in a Delphi project

Tags:

c

linker

delphi

We have a .lib file with functionality that must be included in a Delphi application.

It is easy to include .obj files, but for some unknown reason, this won't work for .lib files. The help is not very helpful on this. And a google search did not help that much (most helpful was to use an other linker but I would like to avoid it if possible).

One solution could be using C++ builder to create a package, but I'm not very fond of it.

So the question is, does anybody know a way to include a C .lib file into a Delphi project (so the functionality can be used)? Or is there a way to split the .lib file into .obj files.

(By the way we use 2006.

like image 571
Toon Krijthe Avatar asked Jan 08 '09 11:01

Toon Krijthe


People also ask

What are .LIB files?

LIB (lib.exe) creates standard libraries, import libraries, and export files you can use with LINK when building a program. LIB runs from a command prompt. You can use LIB in the following modes: Building or modifying a COFF library. Extracting a member object to a file.


1 Answers

You can use the tlib.exe tool that comes with C++Builder. If you don't have C++Builder you can download the free C++Compiler 5.5 (http://cc.codegear.com/Free.aspx?id=24778) and use the tlib.exe from it.

like image 66
Andreas Hausladen Avatar answered Sep 22 '22 13:09

Andreas Hausladen