Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

QBRADQ

Problems with CFile and MFC objects

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

When I try to declair an object of CFile it gives me the class not declaired type error. Here are my system includes: #include #include #include #include #include #include What else do I need?

Share this post


Link to post
Share on other sites
Advertisement
- Create a new project
- Make it an MFC project instead of a win32 project, since that''s what you''re doing.

This will set up your project settings correctly. If you want to do it manually, you might try playing with that first tab under Project->Settings->General->Microsoft Foundation Classes.

Share this post


Link to post
Share on other sites
Well, that''s the think. I''m about 5000 lines into this thing and just did a MAJOR overhaul on my orginization, and I want to use MFC for file I/O.

Share this post


Link to post
Share on other sites
try going to the project, settings, and in the general tab, there should be a list box labeled "microsoft foundation classes", and change that to use mfc in a shared dll. im not sure if thats what you need or not.

Share this post


Link to post
Share on other sites
I wasn''t saying you should re-write all of your code. Just start a new project, and copy your code into the template files MFC builds for you. Or do it manually by turning on pre-compiled headers (automatic: stdafx.h) for all of your files and include stdafx.h as the first line in each .cpp file.

Share this post


Link to post
Share on other sites

  • 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!