Solved

C++ Builder3 Linker Error

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
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 goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

910 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

21 Experts available now in Live!

Get 1:1 Help Now