hey everyone,

I am working on a project where I have a C++ library (a precompiled library ) that would be used in my application. My application is a Windows based console application.I am working on VisualStudio 6.0.
I would like to add GUI to this application of mine.

Could you please suggest a way ?

I tried the option of "Simple MFC application" appearing after choosing a windows based console application but that shows the following error

"fatal error C1010 - unexpected end of file while looking for precompiled header directive"

I tried fixing it by adding

#include "stdafx" in all files of my source code,but it dint work.


7 Years
Discussion Span
Last Post by Ancient Dragon

You can't just simply add gui to a console app. Start out by creating an MFC application (not a console app that supports MFC, but a regular MFC program, then choose either dialog (probably what you want) MDI, or SDI. After the gui app is generated, compile and run it to make sure it's correct.

Next add whatever controls you want to the dialog box. Finally start adding the code you had for the console app, leaving out main(). You will most likely have to do a lot of cut and past to get the gui program to work with the code in the console app.

BTW: You can't use precompiled headers with C files (those with *.c extension). If you have any of those then turn off precompiled header option for those, but leave it on for the other *.cpp files.

Edited by Ancient Dragon: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.