I have installed VS 2008. When I try to build a project, I am getting an error saying:
Cannot open include file: 'afxcontrolbars.h': No such file or directory
So, I guess I need to have ribbon controls installed for this. Could you please tell me where the SDK is available for download? A link would be very helpful; I googled for it myself, but I could not find it. :(
Visual Studio 2008 - Microsoft Lifecycle | Microsoft Learn. This browser is no longer supported. Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Select the . sln file in file explorer, right click, select "Open With", select "Visual Studio 2008" or "Visual Studio version Selector".
This seems like a weird problem to me. afxcontrolbars.h
is certainly included in a standard VS 2008 installation. The only way you might be missing MFC components is if you installed the Express version, which doesn't come with support for MFC.
The first thing I would do is check to see if I could create and compile a brand new, blank MFC app using one of the built-in templates. If that works, there's something wrong with your project's properties.
Also check manually in the \Microsoft Visual Studio 9.0\VC\atlmfc\include
directory to see if you can locate the header file before you try to manually re-install the platform SDK. It may be as simple as Visual Studio not being able to locate the file. To remedy that, open the Options dialog, expand the "Projects and Solutions" tree, select "VC++ Directories", select "Win32" and "Include files" from the combo boxes at the top, and ensure that $(VCInstallDir)atlmfc\include
is included in the list:
Of course, the ribbon control (and other ribbon-specific items) weren't added to VS 2008 until the MFC Feature Pack. You will need to download and install that in order to compile applications that take advantage of those features in VS 2008. You can download the Feature Pack here for free.
I have VS2008 on a Win7 64 bit machine.
In my case the include files where installed in the c:\program(x86)
folder, but VS was installed in c:\program
.
By changing the path to the "hardcoded" path
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include
it now works!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With