Article View: borland.public.cppbuilder.nativeapi
Article #14429Re: whats the solution of this linker error ????
From: uskazi
Date: Wed, 13 Aug 2003 18:31
Date: Wed, 13 Aug 2003 18:31
66 lines
2845 bytes
2845 bytes
yes i have added the related '.lib' and '.h'files in the project but still it isn't working.
please help.
"Eyyub Volkan �ektimur" <evcektimur@prokon.com.tr> wrote:
>did you include the related .lib file to your project ?
>
>if you don't have .lib file you can generate it from .dll by using "implib"
>
>for exm:
>
>in command prompt;
>
>implib MyLib.LIB MyDLL.DLL
>
>--
>___________________________________
>Eyyub Volkan �ektimur
>Proya Software & Trade Inc.
>Head of Core Development Department
>"US Kazi" <umarkazi@hotmail.com> wrote in message
>news:3f3a54d1$1@newsgroups.borland.com...
>>
>> 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:
<3f3a83e8$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3f3a54d1$1@newsgroups.borland.com> <3f3a56e0@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10cc67,c04482dd09229097 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-08-13 11:32:07 PST From: "uskazi" <umarkazi@hotmail.com> Sender: "uskazi" <umarkazi@hotmail.com> Reply-To: "uskazi" <umarkazi@hotmail.com> Subject: Re: whats the solution of this linker error ???? Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 82.36.18.181 82.36.18.181 References: <3f3a54d1$1@newsgroups.borland.com> <3f3a56e0@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.65 Message-ID: <3f3a83e8$1@newsgroups.borland.com> Date: 13 Aug 2003 11:31:04 -0700 X-Trace: newsgroups.borland.com 1060799464 207.105.83.65 (13 Aug 2003 11:31:04 -0700) Lines: 67 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail