• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 218
  • Last Modified:

problem with VC++ 6.0 IDE and header file changes

This has been bugging me for a while, maybe my project is setup wrong. I'm using VC++ 6.0 and it seems that if I add a new member variable to a header file and then try to recompile the class, I'm shown a compile error for an unknown reference, until I go and rebuild the entire project.

any idea why this is?
0
PMH4514
Asked:
PMH4514
  • 4
  • 2
1 Solution
 
AxterCommented:
Hi PMH4514,
Sounds like something is wrong with the dependancy settings, or maybe all the files are not included in the project.

Are you sure that ALL the header files (*.h) are included in the project?
When you look at FileView does it include all the header files for your project?

David Maisonave :-)
Cheers!
0
 
PMH4514Author Commented:
I don't see any missing .H files from the project. dependencies appear ok as well.

I had a similar problem once when I had gotten the bluescreen of death and for whatever reason, BIOS date was set back to 1999 and I hadn't noticed, since the dates were all weird, I kept having to recompile.. but that's not the case this time :)
0
 
AxterCommented:
Can you post the exact compile error?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
PMH4514Author Commented:
ok for example, CDisplay - a class that compiles successfully.. I just opened up Display.h and added:

private:
  CRect* m_pTest;

and then within the constructor for CDisplay I added:

m_pTest = NULL;

and I then right-clicked Display.cpp and hit compile, and I get this:

Compiling...
Display.cpp
E:\CODE\Display.cpp(38) : error C2065: 'm_pTest' : undeclared identifier
Error executing cl.exe.

Display.obj - 1 error(s), 0 warning(s)



if I then go to the Build menu and rebuild all and wait for the whole project to recompile, it compiles just fine.. subsequent right-click/compile on Display.cpp work just fine..

and I get a similar thing anytime I change any header and try to recompile just that class
0
 
PMH4514Author Commented:
possibly a project or workspace file is protected under source safe?
0
 
PMH4514Author Commented:
>>Are you sure that ALL the header files (*.h) are included in the project?
wow, that was it actually.. I looked and looked and looked some more and thought everything was in place.. first sip of coffee this morning and suddenly I said to myself "oh, wait a sec.."

there were two files missing from the project, that were in the folder.

odd.. but thanks!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now