-
December 24th, 2011, 04:07 AM
#1
Fatal Error C1854
Can someone please translate what MSDN is trying to tell me about this error? I didn't see any entries in the forums about this.
error C2146a : syntax error : nebulizer stained in the tower floppy apple rider. Go rubble in flee smite. Bleeble snip snip.
Documentation says: error C2146a - This means there is an error somewhere in the course of human endeavor. Fix in the usual way.
-
December 24th, 2011, 05:47 AM
#2
Re: Fatal Error C1854
high among the clouds
Black Wing sparrow
trembling and alone soars
proudly above the ground
-
December 24th, 2011, 02:24 PM
#3
Re: Fatal Error C1854
LOL. That sounds about right.
While I appreciate the humor, I'm afraid it leaves me no closer to understanding the problem. What is a "fatal error C1854"?
All MSDN says is:
cannot overwrite information formed during creation of the precompiled header in object file: 'filename'
You specified the /Yu (use precompiled header) option after specifying the /Yc (create precompiled header) option for the same file. Certain declarations (such as declarations including __declspec dllexport) make this invalid.
error C2146a : syntax error : nebulizer stained in the tower floppy apple rider. Go rubble in flee smite. Bleeble snip snip.
Documentation says: error C2146a - This means there is an error somewhere in the course of human endeavor. Fix in the usual way.
-
December 24th, 2011, 02:30 PM
#4
Re: Fatal Error C1854
You specified the /Yu (use precompiled header) option after specifying the /Yc (create precompiled header) option for the same file.
Well, did you? And if you did, what for?
Best regards,
Igor
-
December 24th, 2011, 02:38 PM
#5
Re: Fatal Error C1854
Originally Posted by paradoxresolved
LOL. That sounds about right.
Your post is so short, that C2146a looks like part of the question, so I did my best to answer it My mistake...
Generally, when precompiled headers are used, stdafx.cpp has "Create precompiled header" parameter, and all other source files have "Use precompiled header" with stdafx.h. Any other combination is incorrect.
stdafx.cpp is compiled first, and during this compilation all h-files included to it are scanned, and precompiled header (.pch) is created. This allows fast compilation of all other files, since information from h-files can be extracted from .pch file.
Last edited by Alex F; December 24th, 2011 at 02:41 PM.
-
December 24th, 2011, 03:40 PM
#6
Re: Fatal Error C1854
Originally Posted by Alex F
Your post is so short, that C2146a looks like part of the question
I read it that way too. The sig just made the post look like some kind of nutty ramble, not a real question.
-
December 24th, 2011, 05:12 PM
#7
Re: Fatal Error C1854
Well, did you? And if you did, what for?
Sadly, I wish I could answer that. I'm not even sure where to find these parameters. Er, well, I see /Yu, but I don't know where the other is. The entire thing worked until one particular build and all the sudden it started complaining. I don't know what triggered it. I wish I remembered changing things.
What does stdafx stand for? And it has a parameter in it that creates a precompiled header file of all the other background header files?
error C2146a : syntax error : nebulizer stained in the tower floppy apple rider. Go rubble in flee smite. Bleeble snip snip.
Documentation says: error C2146a - This means there is an error somewhere in the course of human endeavor. Fix in the usual way.
-
December 25th, 2011, 04:37 AM
#8
Re: Fatal Error C1854
Project - Properties - Configuration Properties - C/C++ - Precompiled Headers.
Create/use precompuled header: /Yu
Create/use pch through file: stdafx.h
Precompiled header file: $(IntDir)\$(TargetName).pch
Right-click on every .cpp file, except stdafx.cpp - it should have the same properties.
Right-click stdafx.cpp. It should have these properties:
Create/use precompuled header: /Yc
Create/use pch through file: stdafx.h
Precompiled header file: $(IntDir)\$(TargetName).pch
To see full command line, used for compilation, open file BuildLog.htm - many problems can be solved by reading this file. It contains full cl.exe command line for every compiled file.
Last edited by Alex F; December 25th, 2011 at 08:27 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|