7 Replies - 765 Views - Last Post: 22 September 2008 - 10:18 AM Rate Topic: -----

#1 modernic2008  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 63
  • Joined: 25-October 07

My VS.Net 2008 Pro. Edition doesn't support headers.

Posted 20 September 2008 - 09:07 AM

#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;



My VS 2008 Pro. shows error messages of missing header in all cases except if the header is stdafx.h. And, oh well, it's not like I'll only program in stdafx, anyway. So, any ideas about where the problem is and how to correct it? Thank you.
Is This A Good Question/Topic? 0
  • +

Replies To: My VS.Net 2008 Pro. Edition doesn't support headers.

#2 csmanoj  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 10
  • View blog
  • Posts: 150
  • Joined: 06-August 07

Re: My VS.Net 2008 Pro. Edition doesn't support headers.

Posted 20 September 2008 - 10:24 AM

You must have accidentally changed the include directory folders. Or you might have de-selected the files when you installed VS. You can check if you have the proper directories specified in Tools->Options->Projects and Solutions->VC++ directories.
Was This Post Helpful? 0
  • +
  • -

#3 modernic2008  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 63
  • Joined: 25-October 07

Re: My VS.Net 2008 Pro. Edition doesn't support headers.

Posted 20 September 2008 - 12:38 PM

View Postcsmanoj, on 20 Sep, 2008 - 10:24 AM, said:

You must have accidentally changed the include directory folders. Or you might have de-selected the files when you installed VS. You can check if you have the proper directories specified in Tools->Options->Projects and Solutions->VC++ directories.


Thanks,CS Manoj for helping me out. I did just what you said (although I had to import a new environment first), and when I clicked the Check button, no message box showed or anything of that sort. I went through the Include folder in the Program Files, and found the files I was looking for, they didn't have the extension .h though. (They didn't have any extension!). I renamed them so that they include the extension and tried again. Not any better.

So, I imported them to my project's Headers folders, but it was in vain.

So, what's the next step?

Thanks a bunch!
Was This Post Helpful? 0
  • +
  • -

#4 MorphiusFaydal  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 43
  • View blog
  • Posts: 1,376
  • Joined: 12-May 05

Re: My VS.Net 2008 Pro. Edition doesn't support headers.

Posted 20 September 2008 - 12:41 PM

Try turning off "Precompiled headers" when you create a new project.

And they're not supposed to have an extension.

This post has been edited by MorphiusFaydal: 20 September 2008 - 12:50 PM

Was This Post Helpful? 0
  • +
  • -

#5 modernic2008  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 63
  • Joined: 25-October 07

Re: My VS.Net 2008 Pro. Edition doesn't support headers.

Posted 20 September 2008 - 07:24 PM

View PostMorphiusFaydal, on 20 Sep, 2008 - 12:41 PM, said:

Try turning off "Precompiled headers" when you create a new project.

And they're not supposed to have an extension.

Thanks. But, I'm a newbie (as everybody probably realized. ;p ) and I don't know how to do that exactly. Didn't find any "precompiled header" when creating a project.
Was This Post Helpful? 0
  • +
  • -

#6 MorphiusFaydal  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 43
  • View blog
  • Posts: 1,376
  • Joined: 12-May 05

Re: My VS.Net 2008 Pro. Edition doesn't support headers.

Posted 21 September 2008 - 05:39 AM

When you create a new C++ project, rather than immediately hitting "Finish" on the wizard, hit "Next" and it'll present you with a bunch of options. One of those is "Precompiled Headers"

And like I said... You shouldn't have added the ".h" to all the headers in the include directory... They're not supposed to have it, and it will undoubtedly f*** s*** up.
Was This Post Helpful? 0
  • +
  • -

#7 modernic2008  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 63
  • Joined: 25-October 07

Re: My VS.Net 2008 Pro. Edition doesn't support headers.

Posted 22 September 2008 - 02:49 AM

Thanks, that worked!!!
Was This Post Helpful? 0
  • +
  • -

#8 PostulateMan  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 2
  • View blog
  • Posts: 50
  • Joined: 14-September 08

Re: My VS.Net 2008 Pro. Edition doesn't support headers.

Posted 22 September 2008 - 10:18 AM

For future reference, if you are using Precompiled Headers for any reason (though I hardly ever), in any source files you need only to include the specified header first. In this case, stdafx.h was the precompiled header generated by VS so it should be the first thing done in source files.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1