Article View: borland.public.cppbuilder.nativeapi
Article #14425whats the solution of this linker error ????
From: US Kazi
Date: Wed, 13 Aug 2003 15:10
Date: Wed, 13 Aug 2003 15:10
36 lines
1987 bytes
1987 bytes
I am trying to read parallel port of PC while using windows
XP.i have got a manufacturer driver, which has got a DLL file
to communicate with parallel port. but i am having a linker
error which is confusing me ,and i don't know how to solve it
the source code is below followed by the errors
*************************************
#include <stdio.h>
#include <dos.h>
# include "BytioXP.h" //manufacturer's provided header file//
#define baseadd (0x378)
extern "C"
void __import __stdcall OutVal(unsigned short IOAddress, unsigned short Value);
short __import __stdcall InpVal(unsigned short IOAddress);
{
int x;
OutVal(baseadd,5);
x == InpVal(baseadd);
cout << "the value is " << x<<;
getch();
return 0;
}
and the error which comes up after compiling is
[Linker Error] Unresolved external 'OutVal' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER4\PROJECTS\PROJECT2.OBJ.
[Linker Error] Unresolved external 'InpVal' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER4\PROJECTS\PROJECT2.OBJ.
please tell me where things are going wrong.. and how can i fix them
regards
Technical Details
Message-ID:
<3f3a54d1$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!ash.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,c04482dd09229097,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-08-13 08:31:50 PST From: "US Kazi" <umarkazi@hotmail.com> Sender: "US Kazi" <umarkazi@hotmail.com> Reply-To: "US Kazi" <umarkazi@hotmail.com> Subject: whats the solution of this linker error ???? Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 147.188.89.30 147.188.89.30 NNTP-Posting-Host: 207.105.83.65 Message-ID: <3f3a54d1$1@newsgroups.borland.com> Date: 13 Aug 2003 08:10:09 -0700 X-Trace: newsgroups.borland.com 1060787409 207.105.83.65 (13 Aug 2003 08:10:09 -0700) Lines: 38 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!ash.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail