Solved

Using C LIB files in Delphi

Posted on 1997-02-27
2
1,291 Views
Last Modified: 2013-12-04
I have a couple of C LIB files, and respective header files.
I need to make use of these from Delphi.
 
The only way I can figure is to build .OBJ object files, and include them in my app.
Now my problem is...HOW ?

Some-one mentioned to me I should use PLINK, apparantly a feature which was supplied as part of dos 3.x
 
However, I would assume the .LIBs are 32 bit, as they have been developed for NT use only.
 
Since my knowledge of C is limited, and the LIBs contain MANY calls, I don't want to go through the excersize of developing a DLL, in C, unless it's my last option.

What now ???
0
Comment
Question by:bond022797
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
marko020397 earned 200 total points
ID: 1298885
Delphi uses libraries for accessing to databases. It uses idapi.lib or idapi32.lib in Delphi 2. You should have a BDE.INT somewhere in your Delphi directories. It's a sample of IDAPI.H translated to Delphi pascal. If you installed sources to you have all the sources for database components, which uses idapi.lib.

In Project Options/Library/Library Path you should set a path to your libraries.

I tnink this examples should help you. I didn't have enough time to try to make an example of using a library. Let me know if you had some success. If not write back and I'll try to make an example.

Marko
0
 

Author Comment

by:bond022797
ID: 1298886
Marko

Thanks for the reply. However, the idapi lib is actually a DLL.
The file formats I have are *.LIB. I performed a search in the
Borland dirs for IDAPI*, and found only DLLs.

I am using a full blown version of Delphi 2.1 (w/src), and
am led to believe I have all borland want me to...

Project Options/Library... I assume you are explaining a menu
selection...  No such menu option

Project/Options supplies a dialog, with no indication to defining
library paths. I checked out Tools/Options/Library, but as far as I can tell, this only points to Delphi style libraries (.DCU).

Once again, thanks for the answer. Perhaps you could elaborate a little more. I feel though, that I will need to develop a DLL from C anyways, which can then be used from Delphi.

Hope to hear from you soon
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question