I run the HIDClient project in VS2008 Pro Edition but it didn't build successfully the error message:fatal error C1083: Cannot open include file: 'afxwin.h': No such file or directory. I searched everywhere and do a steps for some configuration and build the solution but still I got the same error. I also follow the steps for building the application in this discussion http://www.keil.com/forum/12727/hid-client-example/ but still the same error i've encountered. Anyone knows how to figure out this error? Please share it to me. Thanks.
It's clearly telling you that it can't find the file, isn't it?
So you obviously need to verify two things:
1. Does this file actually exist on you system?
2. If it exists, is your project correctly figured with the location of this file so that the compiler can find it?
afxwin.h is a MFC (Microsoft Foundation Class) header. It should be located in this folder. C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include
If you can't find above folder, MFC option was not chosen on VS2008 Pro installation. Run the installer again for additional installation of MFC.
OR
Keil HIDClient project is made on VS2005 When you drag in HIDClient.vcproj to VS2008 IDE, auto-convert dialog appears. You've canceled this conversion. And then, the include path was not corrected.
Tsuneo
C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include - this file is not missing and i can find the afxwin.h in this folder. Also this path is included in the project solution.
During the conversion of the project I didn't click the CANCEL button.
Another option I did, is creating an empty project and add the existing files (important file) and build the application but still I encountered the same error.
Yeah, its really obvious that it tells that it can't find the file but the files are existing in my system. I also included it in the directory path.
> Also this path is included in the project solution.
Do you mean this entry is listed up on the include path of Options - Project & Solution dialog?
$(VCInstallDir)atlmfc\include
The value of $(VCInstallDir) macro comes from this Registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VC\ProductDir
For default installation, its value is, c:\Program Files\Microsoft Visual Studio 9.0\VC\
What is this value on the Registry of your PC? And does it match to the actual location of VC?