?
Solved

fatal error C1083

Posted on 2004-08-03
10
Medium Priority
?
2,814 Views
Last Modified: 2010-08-05
I'm trying to compile this code I got from someone.
I keep on getting "fatal error C1083: Cannot open include file: 'xxx.h': No such file or directory" (where xxx.h is the name of the file).
The file xxx.h exists in the project, but I guess the file that has the include "xxx.h" can't find it.
What can be wrong? What should I check?

Thanks.
0
Comment
Question by:chayahd99
  • 3
  • 2
  • 2
  • +2
10 Comments
 
LVL 12

Expert Comment

by:andrewjb
ID: 11703175
Compiler?

Make sure the directory where the .h file is is on the 'include path'. This'll probably be somewhere in the project options for your application. Depends upon the platform.
0
 

Author Comment

by:chayahd99
ID: 11703232
I'm using Visual C++.
I can't find in Project --> Settings where to define this.
Besides, why should I need to define it manualy? Isn't the 'include' statment enough ?
0
 
LVL 12

Expert Comment

by:andrewjb
ID: 11703308
Sorry - haven't VC++ installed, and can't remember exactly where it is. (It's reasonably obvious, through!)

The #include is fine if you include the full directory of the file. Otherwise it needs to know where to go looking on your drive!
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 16

Accepted Solution

by:
nonubik earned 150 total points
ID: 11703416
Project --> Settings -> c/c++ -> Category 'preprocessor' -> 'Additional include directories' field
0
 
LVL 9

Expert Comment

by:tinchos
ID: 11704706
You have 3 possibilities

1)
You can place the complete path to the file, something like.....

#include "c:\development\myProj\Include\xxx.h"

2) If the include directory is a directory where include files from all projects can be included

you can do

Tools -> Options -> Projects -> VC++ Directories -> Include files and add the directory there.

3) you can do nonubik suggestion.
Suggestion number 2 would be the same as using number 3 for every project you use in Visual Studio......

Hope this helps

Tincho


0
 

Author Comment

by:chayahd99
ID: 11704710
Thanks nonubik.
I followed the steps you wrote & saw that the directory which containes the h file is written properly, together with other paths.
What else can it be ?
0
 
LVL 9

Expert Comment

by:tinchos
ID: 11704794
Try the suggestions I posted

Tincho
0
 
LVL 16

Expert Comment

by:nonubik
ID: 11705133
Let's take the MSDN explanations, step by step. Could be one of:

-File, subdirectory, or disk is read-only.
-No access permission for file or directory. (not likely)
-Not enough file handles. Close some applications and recompile. (not likely at all)
-An #include directive uses double quotation marks around a path specification, which causes the standard directories to be skipped.
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 11705433
Are directories in your settings separated by commas or other sign?
0
 

Author Comment

by:chayahd99
ID: 11713790
nonubik's solution is basicly what I needed to do, but for a different file.

Meaning:

file b includes file a.
file c include file  b.

in the code & settings for file b, file a was marked as an include file.
in the code & settings for file c, file b was marked as an include file.

I added to the settings of file c an include to file a & that solved the problem.
I'm not sure why this is required, but it worked.

I'll be glad to get an explanation.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question