Solved

C++ Builder3 Linker Error

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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
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.

772 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