Jump to content
  • Advertisement
Sign in to follow this  
fathom88

Silly Question on VC++ Header Directives

This topic is 4836 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

I'm trying to create some classes inside a VC++ studio project. I created a standard Window project with multiple views. I'm having problems adding generic classes. On my .cpp files, the compiler complains about an "unexpected end of file" error; c1010. I have to add the line: #include "stdafx.h" to make the compiler happy. I want my class to be generic and not have to change anything when I port to UNIX. Obviously, the stdafx file does not exists in UNIX (unless you make a dummy file). I tried to do wrap the include inside a #ifdef WIN32, but the compiler gives an unexpected #endif error, c1020. Is there a project setting to fix this problem? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Turn off precompiled headers.

In VC.NET you go to project->properties->C/C++->Precompiled headers and fiddle with the settings there.

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!