Hello, I have bought the Keil development tool for mcb2148 and I'm trying to compile the HID client example that comes with it... However using borland c++ 6 I get lots of error messages. If anyone knows how to solve this please leave me a note. Thanks Doug
Tsuneo, these are the errors I get... Do you know what could cause this?
D:\WINDDK\3790.1830\inc\mfc42\afxres.rc(152) : error RC2135 : file not found: res\help.cur D:\WINDDK\3790.1830\inc\mfc42\afxres.rc(171) : error RC2135 : file not found: res\3dcheck.bmp D:\WINDDK\3790.1830\inc\mfc42\afxres.rc(194) : error RC2135 : file not found: res\minifwnd.bmp D:\WINDDK\3790.1830\inc\mfc42\afxres.rc(199) : error RC2135 : file not found: res\ntcheck.bmp D:\WINDDK\3790.1830\inc\mfc42\afxres.rc(200) : error RC2135 : file not found: res\95check.bmp
Now, what could the probable causes be that a compiler fails to find files? Care to take a guess?
- That you don't have any files with that name on your hard drive? - That you have the files, but that you haven't instructed the tool to process that specific directory? - That you have the files, but have specified any access rights that forbidds the compiler from accessing them (not too common problem on Win32 machines)
So, time for you to start figuring out why you get these error messages, since we can not guess what files you have in your machine or where they are stored or where you have allowed the compiler to search...
I have the files on my machine. But I don't know where to include .bmp files. I have tried putting them on the folders that are included on the vc++ directories but that didn't work.
I figured it out, the /res folder didn't exist on the mfc so I created it and put the files there. It worked sorry about bugging you guys... and thanks !
You seem to get into the porting trouble of MFC (Microsoft Foundation Class). I think it is the waste of your valuable time. Rather, split out the example code into building blocks, and ignore the GUI and framework of MFC.
The essential blocks for USB handling are, - The SetupDi-APIs are used to specify the device, and to get the device handle. - USB communication is done over this device handle, using File I/O, CreateFile - ReadFile - WriteFile - CloseHandle.
These code are stereotype one, and they works either in MSVC or C++ builder without modification, because these code use just the Windows APIs directly. Plug these blocks into the framework and GUI of C++ builder.
Blind porting doesn't bring you any understanding of USB handling.
Tsuneo
I think the same can be said of any example code - not just USB!
Tsuneo, I've done just what you told me to. I'm using 64 bytes repots just like you've explained on another post. Still I don't get outreports from my application. What could be the cause of this? Any ideas on what sort of test should I do?
I wonder if this specific example doesn't work with vc++ 2008 express edition. Maybe it was compiled with some earlier version of the software, but all I know is that it doesn't work, the closest I've got for the example were linker errors.
"I wonder if this specific example doesn't work with vc++ 2008 express edition."
Unfortunately, Express edition doesn't support MFC. Just .Net FrameWork.