Filip
Filip

Reputation: 359

Visual Studio 2010, C++, Cannot open include file: 'base.h'

I'm trying to build a project in Visual Studio 2010. But I get the following error:

fatal error C1083: Cannot open include file: 'base.h': No such file or directory

This is a part of the code from (stdafx.h) generating the error:

// from Base project

include "base.h"

include "basic.h"

include "logfile.h"

It seems that the project uses "MFC Microsoft Office Fluent User Interface (the "Fluent UI")". Do I have to install anything else than Visual Studio for using it? Something that is missing, that generates the error?

I'm quite new to C++ and Visual Studio.

EDIT:

The problem is that I can't find the files: // from Base project #include "base.h" #include "basic.h" #include "logfile.h" And I don't really know what they are for. I guess some MFC stuff? And they are not anywhere on my disk.

I'm using Windows 7, I don't know on which OS the project is developed on. Can it be that it's developed on WinXP for instance? In that case, do I need to install the SDK for WinXP?

Upvotes: 0

Views: 5571

Answers (3)

Filip
Filip

Reputation: 359

The problem with this was missing files in the project. Thanks for the help.

Upvotes: 0

Sivaraman
Sivaraman

Reputation: 458

  1. Make sure base.h available in the working directory
  2. Right click the base.h (From code editor) and click open document in the context menu (first menu item)
  3. Search that file in your project root folder, then make sure that the path for the file is available in the additional include directory. Project property page --> Select C/C++, first entry on the right side grid.

Upvotes: 1

Attila
Attila

Reputation: 28762

The Fluency UI is part of a MSVC++ feature pack, which you will have to install on top of Visual Studio (you can dowload it following the links in the given page).

In particular the error is due to the fact that the compiler cannot find the file base.h, which could be because it is part of the above mentioned feature pack (and thus it is currently missing) or (if the file does exist on your computer) because your include path (the path the compiler consults for finding included files) is set up incorrectly

Upvotes: 1

Related Questions