Using extern C and mfc?
When trying to compile an mfc application with an include c header using the extern "C" directive I get the following error:
fatal error C1010: unexpected end of file while looking for precompiled header directive
When not compiling as an mfc application it works fine, but I want to add a gui to my old mixed c and cpp application.
this really belongs in the windows section, but anyway, if you go to your project properties, and browse through the options, there is one that says something like "do not use precompiled headers". You will need to do that if you are going to mix C code with your MFC app.
you have to turn off precompiled headers for *.c files. If you are using VC++ 6.0 select menu item Projects --> Settings, hit the C++ tab, select "Precompiled Headers" in the Category combo box, On the left-most side of the Project Settings dialog box, expand the project tree view and select the *.c file(s). Then select the "Not using precompiled headers" radio button on the right side of the dialog box. Finally, select the Ok button.
If you are using .NET 2003 compiler, you also turn off precompiled headers similar to, but not exactly like, the above description for VC++ 6.0. I don't have that compiler, but you should be able to figure it out on your own.