Solved

Using C LIB files in Delphi

Posted on 1997-02-27
2
1,280 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
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now