Solved

C++ Builder3 Linker Error

Posted on 2001-06-07
2
288 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
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…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

809 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