Jump to content
  • Advertisement
Sign in to follow this  
AndrewPL

precompiled header

This topic is 4851 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! I've got this problem: I have a samole in VisualStudio.NET and it's working just fine, but I want to write it fom the begining to learn in that way. The sample was using a header file which I wanted to remove. I couldn't do that becouse the app. wouldn't compile so I removed whole code from this heder. Now my main file is including file "header.h" which is empty. But still when I want to remove the line #include "header.h" in main.cpp I'm having an error: "precompiled header is mising" or sth like that. How can i remove that line and make it work? Why cpp is using precompiled headers? Is it necessary? thx for reading and answer if any.

Share this post


Link to post
Share on other sites
Advertisement
In Project-><Name> properties->C/C++->Precompiled headers you can set Create/Use Precompiled header to "Not Using Precompiled Headers".

The precompiled headers is used in projects to either improve compilation time or force all source files to include something. You might have some macros or functions inside your precompiled header which all source files should have access to.

Share this post


Link to post
Share on other sites
I've set prpoperties as said and olso removed a line #include "header.h" but still i'm havieng an error:
fatal error C1010: unexpected end of file while looking for precompiled header directive

Share this post


Link to post
Share on other sites
The "Create/Use Precompiled header" property is set to "Not Using Precompiled Headers"? You are sure you didn't press cancel instead of ok right?

Share this post


Link to post
Share on other sites
Yes I've cheched once again. In properties its "Not Using Precompiled Headers" option selected. I've got no idea why tis error occure. Maby it's becouse I'm not creating a new project but i'm usin the old one. Have no clue :-/

Share this post


Link to post
Share on other sites
I'm not sure this will fix the problem, but do you have a source file with the same name as the precompiled header had just with .cpp instead of .h? If you have try to remove it from your project and if it contains code move it to another file, if that doesn't work I dont know what is wrong.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!