|
This sounds like a homework assignment.
We don't do homework
|
|
|
|
|
Actually no... Thanks though.
I've been out of school for quite sometime.
I'm just clearing things up since some of these functions I've never used.
Just because other ppl are more adept at programming doesn't mean the the ones that are teaching themselves to be better at it should be penalized or scoffed at.
thanks for your help though.
Kitty5
-- modified at 8:55 Monday 24th July, 2006
|
|
|
|
|
bob16972 wrote: This sounds like a homework assignment.
Not even remotely.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
kitty5 wrote: fprintf( fpwrite, buffer );
Should be:
fprintf( fpwrite, "%lu", buffer[0]);
fprintf( fpwrite, "%lu", buffer[1]);
...
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi all,
Iam trying to read and write to USB device.
I get an error message
error LNK2001: unresolved external symbol "public: enum FT_STATUS __thiscall CUSBtestDlg::GetStatus(unsigned long *,unsigned long *,unsigned long *)" (?GetStatus@CUSBtestDlg@@QAE?AW4FT_STATUS@@PAK00@Z)
Release/USBtest.exe : fatal error LNK1120: 1 unresolved externals
I tried debugging but in vain.
Can anyone help/ any ideas?
|
|
|
|
|
You need to see why the implementation of CUSBtestDlg::GetStatus(unsigned long *,unsigned long *,unsigned long *) is not in any of your cpp or header files that are included in your project. Have you added all the cpp files in your source folder to the project??
John
|
|
|
|
|
Hi John n Naveen,
Thanks for the response.
In the header file I do,
protected:<br />
typedef FT_STATUS (WINAPI *PtrToGetStatus)(FT_HANDLE, LPDWORD, LPDWORD, LPDWORD);<br />
PtrToGetStatus m_pGetStatus;<br />
FT_STATUS GetStatus(LPDWORD, LPDWORD, LPDWORD);<br />
in the cpp file, I do
int CUSBtestDlg::Buf_Read(void)<br />
{<br />
DWORD dRxBytes;<br />
DWORD dTxBytes;<br />
<br />
DWORD dEventStatus;<br />
<br />
GetStatus(&dRxBytes,&dTxBytes,&dEventStatus);<br />
}
I get the error message that i mentioned before for this.
But I do the FT_STATUS FT_Read() also in the similar way and that works.
Any sugestion.?
-- modified at 23:41 Sunday 23rd July, 2006
|
|
|
|
|
but where is the definition of the funtion GetStatus(..)?
nave
|
|
|
|
|
FT_GetStatus is the FTD2XX_API library funciton.
This is given in the header file ftd2xx.h which is included in the USBtestdlg.h file.
|
|
|
|
|
hoo...So have include the lib file for that api in the project?
nave
|
|
|
|
|
have included the ftd2xx.h file as external dependency in the project. so the drivers installed should take care of linking the functions and reading and writing from the device(USB).
I can use their FT_Read and FT_Write functions without any errors.
Infact I have done the same way for GetStatus too.
|
|
|
|
|
u have to include the lib file for the same.
take menu project->Settings
in the link tab, there will be an edit box called object/library modules. Give the name of the lib file there and rebuild the project.
nave
|
|
|
|
|
FT_Read and FT_Write and FT_GetStatus are all in the same.
I dont know what I should include now.
|
|
|
|
|
thathvamsi wrote: are all in the same.
same what?dll?
Actually whats "FTD2XX_API library funciton".Can u give me any link so that i can tell u, to what lib u must link.
nave
|
|
|
|
|
I meant the dll.
Its the FTD2xx.dll that links the application software with the USB device.
|
|
|
|
|
|
Hey,
thanks, I did.
works now.
Thanks for ur help.
|
|
|
|
|
U might have declared a Funtion like "CUSBtestDlg::GetStatus(.)" in the header file ( say USBtestDlg.h ) but the body or funtion definiton is not written. More over u have called that funtion from some else.
Solutions.
Either remove the funtion declaration from the header file or Add the function definition in the CPP file
nave
|
|
|
|
|
Hey,
I have posted my code / response in my previous message.
Any help/ideas?
|
|
|
|
|
i am trying to make an number 1.111111
store into a float as 1.11
mean something like
int float lala = 1.111111;<==how can isave as 2 decimal place
|
|
|
|
|
To clip off the rest of the ones, you can
double dfNum=1.111111;
dfNum*=100;
dfNum=(int)dfNum;
dfNum/=100;
TRACE("%f\n",dfNum);
|
|
|
|
|
Is there anybody who can help me??????From past two days i am trying my best..but still...
Whenever I open a new project and try to compile it i got the error....
Any of you had this problem ? If so how do you solved it ?
c:\program files\microsoft visual studio\vc98\include\winnt.h(1092) : error
C2146: syntax error : missing ';' before identifier 'KSPIN_LOCK'
c:\program files\microsoft visual studio\vc98\include\winnt.h(1092) : fatal
error C1004: unexpected end of file found
|
|
|
|
|
priyanka s wrote: c:\program files\microsoft visual studio\vc98\include\winnt.h(1092) : fatal
error C1004: unexpected end of file found
The above error is coming because u must compile the stdafx.cpp before compiling any other files first time.It good u build (not compile )the entire project first.
nave
|
|
|
|
|
I ALREADY BUILD THE WHOLE PROJECT BEFORE COMPILE....
|
|
|
|
|
Whats your program, are you getting this error in all your programs
|
|
|
|