regarding compilation fatal errors C1083 and C1010

Hello

When i am trying to run a vc++ application i get in the fatal error C1083. When i read some of the forums they say that i will have to remove the Precompiled header file option in the project settings.

When i remove the option use precompiled header files, it gives me another fatal error C1010.

Are these two fatal errors interlinked?

Would be thankful to know a permanant solution for these fatal errors.

regards
ashwin
[477 byte] By [ash_es_win] at [2007-11-19 19:44:38]
# 1 Re: regarding compilation fatal errors C1083 and C1010
You have provided too few information to understand yor problem. There can be many causes:

File does not exist.
File, subdirectory, or disk is read-only.
No access permission for file or directory.
Not enough file handles. Close some applications and recompile.
The INCLUDE environment variable is set incorrectly.
An #include directive uses double quotation marks around a path specification, which causes the standard directories to be skipped.
You did not specify /clr and your program uses managed constructs.

It's not related to the precompiled headers (at least from what I understand) (don't know where you got that from).
cilu at 2007-11-10 23:43:02 >
# 2 Re: regarding compilation fatal errors C1083 and C1010
You have provided too few information to understand yor problem. There can be many causes:

File does not exist.
File, subdirectory, or disk is read-only.
No access permission for file or directory.
Not enough file handles. Close some applications and recompile.
The INCLUDE environment variable is set incorrectly.
An #include directive uses double quotation marks around a path specification, which causes the standard directories to be skipped.
You did not specify /clr and your program uses managed constructs.

It's not related to the precompiled headers (at least from what I understand) (don't know where you got that from).

Hello,

It gave me two errors at the same point

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

and on the same point it gives me the same fatal error with the following

fatal error C1083: Cannot open include file: 'StdAfx.h': No such file or directory Error executing cl.exe.

what more informations do you require. Let me know.

Thanks
ash_es_win at 2007-11-10 23:43:56 >
# 3 Re: regarding compilation fatal errors C1083 and C1010
It's not related to the precompiled headers (at least from what I understand) (don't know where you got that from).
Well, C1083 doesn't (unless it is including a file for precompiled header, like "stdafx.h"). But C1010 is exactly a missing include statement for that precompiled header.
Looks like OP just removed reference to that file, and didn't really "remove the Precompiled header file option in the project settings" as he said...
VladimirF at 2007-11-10 23:45:06 >
# 4 Re: regarding compilation fatal errors C1083 and C1010
Well, looks like our posts crossed, and my guess was right.
VladimirF at 2007-11-10 23:46:05 >
# 5 Re: regarding compilation fatal errors C1083 and C1010
Hello

I dont understand what you mean by

"Looks like OP just removed reference to that file, and didn't really "remove the Precompiled header file option in the project settings"

can u be a little more specific.

Thanks
Ashwin
ash_es_win at 2007-11-10 23:47:04 >
# 6 Re: regarding compilation fatal errors C1083 and C1010
IS there no one to help me out?

ashwin
ash_es_win at 2007-11-10 23:48:08 >
# 7 Re: regarding compilation fatal errors C1083 and C1010
IS there no one to help me out?

ashwin
What I said that when you had an error C1083 (can't open a file) and thought that it has to do with precompiled headers, you were only 50% right. It does include precompile header, but it doesn't tell compiler to use precompile headers.
So, after you have removed the line:#inclide "stdafx.h"
the compiler is still looking for a file that contains headers that are (or have to be) precompiled. Now you are getting C1010.
What you need to do is to open your project's properties, go to C/C++ \ Precompiled Headers node and change "Use Precompiled Header" to "No".
VladimirF at 2007-11-10 23:49:01 >
# 8 Re: regarding compilation fatal errors C1083 and C1010
Hello,

gave me the following errors again...now with C1010

Build : warning : failed to (or don't know how to) build 'C:\Grade\G3500\Source\TOLEDB\Debug\TOLEDB.pch'
Compiling...
TDB.cpp
TDB.cpp(1758) : fatal error C1010: unexpected end of file while looking for precompiled header directive
TDB.cpp
C:\Grade\G3500\Source\TOLEDB\TDB.cpp(1758) : fatal error C1010: unexpected end of file while looking for precompiled header directive
Generating Code...
Error executing cl.exe.

TDB.obj - 2 error(s), 1 warning(s)

ashwin
ash_es_win at 2007-11-10 23:50:12 >
# 9 Re: regarding compilation fatal errors C1083 and C1010
Hello,

gave me the following errors again...now with C10101) Turn off precompiled headers in the project options. Make sure you selected the correct project.

2) Remove the #include <stdafx.h> from your file(s).

3) Do a clean rebuild.

Regards,

Paul McKenzie
Paul McKenzie at 2007-11-10 23:51:10 >
# 10 Re: regarding compilation fatal errors C1083 and C1010
Hello,
gave me the following errors again...now with C1010
Well... What did you change?
How do you build your project? Do you use IDE (like Visual Studio)? Or makefile?
Did you read in my previous post:

What you need to do is to open your project's properties, go to C/C++ \ Precompiled Headers node and change "Use Precompiled Header" to "No".
VladimirF at 2007-11-10 23:52:05 >
# 11 Re: regarding compilation fatal errors C1083 and C1010
Well, C1083 doesn't (unless it is including a file for precompiled header, like "stdafx.h"). But C1010 is exactly a missing include statement for that precompiled header.
I was refering to the first, which was the original error.

TDB.cpp(1758) : fatal error C1010: unexpected end of file while looking for precompiled header directive
#include "stdafx.h" must be the first include in your cpp files.
cilu at 2007-11-10 23:53:08 >
# 12 Re: regarding compilation fatal errors C1083 and C1010
Now when i removed the stdafx.h file and do a clean rebuild it points to the next header file oledb.h with the same fatal error C1083.

TDB.cpp
TDB.cpp(21) : fatal error C1083: Cannot open include file: 'oledb.h': No such file or directory
TDB.cpp
C:\Grade\G3500\Source\TOLEDB\TDB.cpp(21) : fatal error C1083: Cannot open include file: 'oledb.h': No such file or directory
Generating Code...
Error executing cl.exe.

TDB.obj - 2 error(s), 0 warning(s)

If i removed oledb.h file then it gave me a lot errors. I have removed the use precompiled header file option the very first time.

I hope i get some answers still

thanks
ashwin
ash_es_win at 2007-11-10 23:54:11 >
# 13 Re: regarding compilation fatal errors C1083 and C1010
Do you actualy have "oledb.h"? Do you have the path to the folder where it is located corectly set (Tool > Options > Directories or Project > Settings > C/C++ Preprocesor > Additional include directories)?
cilu at 2007-11-10 23:55:07 >
# 14 Re: regarding compilation fatal errors C1083 and C1010
How did you start your project? as an MFC-based?

I stumbled across similar problems. I was building a WIN32 aplication, not configured for handling the MFC. But at some point I needed screen output to debug, so I decided to add the stdafx.h to my program, but it didn't work. As I was tracking down the problem, I noticed that the stdafx.h file does not appear to be in the standard include directories of the project. After that I runned a search of my disk and found the stdafx files but they were of different size compared with the ones that i've used before, and simply adding the path didn't seem to work either. so I created a dummy project with MFC-support, and I copied the stdafx.h/.cpp to my project folder, and added them to my project. You must also set in the project settings that you want the MFC library linked onto you project. For me it solved the problems. I hope it helps...

greetings, Han
Lintworm at 2007-11-10 23:56:10 >
# 15 Re: regarding compilation fatal errors C1083 and C1010
Do you actualy have "oledb.h"? Do you have the path to the folder where it is located corectly set (Tool > Options > Directories or Project > Settings > C/C++ Preprocesor > Additional include directories)?

I actually have the oledb.h file but nothing is being listed on the additional include directory (it is empty)... so do i need to add the path there??

Thanks
Ashwin
ash_es_win at 2007-11-10 23:57:13 >
# 16 Re: regarding compilation fatal errors C1083 and C1010
I have a vc++ project. I tried to insert a resource into it(a dialog). As soon as i insert it and create a new class, vs 6 automatically generates all the code.

But when i compile, it gives me the fatal error C1083.

Compiling...
TDB.cpp
C:\Grade\G3500\Source\TOLEDB\TDB.cpp(4) : fatal error C1083: Cannot open include file: 'oledb.h': No such file or directory
Authentication.cpp
C:\Grade\G3500\Source\TOLEDB\Authentication.cpp(4) : fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory
Generating Code...
Error executing cl.exe.

TOLEDB.dll - 2 error(s), 0 warning(s)

As one can see TDB.cpp was the already existing project and Authentication.cpp was the resource source file that i tried to insert. Now it automatically adds this stdafx.h.

Before adding the resource the TDB.cpp was able to be built. Now it gives me the fatal error on the oledb.h include statement..

need to know the settings on the project...last time when i posted another forum regarding the same issue, the various suggestions on the project settings did not work...

hope i get an answer to this issue..

Thanks
Ashwin
ash_es_win at 2007-11-10 23:58:12 >
# 17 Re: regarding compilation fatal errors C1083 and C1010
[ merged threads ]
cilu at 2007-11-10 23:59:14 >
# 18 Re: regarding compilation fatal errors C1083 and C1010
Have you changed the project settings for Automatically generate precompiled header?

Is this 'oledb.h' distributed with Platform SDK? Do you have the folder where it is located listed under Tools > Options > Directories > Include files ?
cilu at 2007-11-11 0:00:19 >