• 0

Dev C++ doesn't seem to like stdafx.h?


Question

Hi, friends!

So, I'm making the jump from console C++ to Windows programs, and actually having a lot of fun with that! But my method is, to use my Beginner's edition VC++ to compose the program, and when it's "done", I switch to the free Bloodshed Dev C++ compiler (because the VC always puts that annoying dialog box you have to dismiss before the program will run, the one that says you can't release your program to the public, end-user-liscence blah,blah).

Usually, I manage OK with finishing a project in Dev that started in VC, but this time I have a dialog-based program that includes <stdafx.h>, which in turn includes five other afx*.h files, too.

Dev C++ throws a fit about this. Even after I copied every relevent header over to the Dev C++'s Include directory, it STILL complains that it can't find the headers!

Clue #1: This application used MFC wizard alot while it was a Microsoft project. Handy for adding all those bells and whistles, but does that doom it as far as Dev C++ is concerned?

Clue #2: I have noticed multiple repeat includes in different files of the project. Microsoft seemed happy with that, and I assumed everything was guarded by #ifndef statements. But do they only work for Visual C++?

Someone told me once, "Just wait until you get linker errors!" I see what he was talking about, now...

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Yeah, it is pretty much doom as far as Dev C++ is concerned. Dev C++ is fine for compiling Win32 API applications, but it wasn't meant as a platform for developing MFC applications. You MAY be able to finagle it into compiling your MFC app, but you'd probably find yourself importing half of the VC++ header files just to get a clean compile. Even after that, whether or not the app would actually work is not certain.

If you want to use MFC, you should either find a version of VC++ -- or another compiler -- that actually supports MFC. I believe the Borland compiler does.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.