Solved

C++ Builder3 Linker Error

Posted on 2001-06-07
2
283 Views
Last Modified: 2012-08-13
To anyone willing to help,
I am trying to link advantech driver software to a data acquisition program I wrote using Borland C++builder3.
I have a PCL-812PG Multi-Lab card in my machine.

In my program I am able to include the header file "driver.h"
(#include"D:\Program Files\Advantech\ADSAPI\include\driver.h")

The error message reads as follows

[LinkerError] Unresolved external 'pcl818H(int,unsigned int*)' referenced from D:\PROGRAM FILES\BORLAND\CBUILDER3\PROJECTS\THESIS2.OBJ.

Thanks to jhance I have been able to eliminate suspicions of an exclude .LIB file by going in to 'Project Options' then 'Directories/Conditionals' then 'Library Paths' and specifying the path as follows:

D:\Program Files\Advantech\ADSAPI\Examples\BCB\LIB\ADSAPIBC.LIB

'pcl818H' is a function call to a parameter table the driver software uses. I declared at the end of the header file as follows:  extern pcl818H(int, unsigned int *);

This is fundamental stuff I know, but I have little experience in the field and this program is part
of my final year thesis to be presented on the 12th. So I'm pulling my hair out and would be very greatful
for any suggestions.
Thankyou,   (thanks to jhance for the help so far)
Richie.
0
Comment
Question by:RLawless
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 300 total points
ID: 6163531
You'll have to add a library that comes with the header file. The file itself just declares the functions that are used. the implementation resides in either a static lib file or a DLL that is bound to the project by a import lib. Both files end in .lib - see if you have it and add it to your project...
0
 
LVL 5

Expert Comment

by:pbhj
ID: 6163684
jkr seems to be on the ball:  perhaps you've done this already?  You need to  use the file->'add to project'  and select the .lib file from the pop-up menu.  This adds the required file to the project makefile, just using #include isn't enough

Hope this helps.

pbhj
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

758 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

18 Experts available now in Live!

Get 1:1 Help Now