Advertisement

windows programming

Started by March 25, 2002 03:24 PM
5 comments, last by jar 22 years, 8 months ago
i just purchased "Tricks of the Windows Game Programming Gurus", but I''m having trouble with the first Windows program! I''m using MVS C++ 6. i selected win32 application, typed in the code exactly, but when i try to execute the program, it says something like, "This project does not exist.Do you want to include it?" and when i select yes, it doesn''t do anything. What''s going on?
Did you save the source file and include it in your project? Something similar happened to me my first time around.

-AJ

C:\DOS
C:\DOS\RUN
RUN\DOS\RUN

-Comic Book Store Guy''s t-shirt on the Simpsons
C:DOSC:DOSRUNRUNDOSRUN-Comic Book Store Guy's t-shirt that I saw on the Simpsons, although it didn't actually come from the Simpsons.http://vdsoft.netfirms.com/home.html
Advertisement
nah. let me explain what i did in more detail. i did, file new--win32 application. Then i clicked on the workspace button so i can type in the code. then, i click build, execute, and some warnings pop up. am i doing something wrong? (this is my first attempt at making a windows program)
What kinda of program is it?
Just a comment. If this is your FIRST time attempting a windows program, I think the better book for you is something like C++ for Dummies or Learn C++ in 21 Days and such. Again, just a comment.
Your description of what you did is a bit fuzzy to me, so I''ll just describe generally what you should do (if this is what you''ve already done, please don''t be mad at me )

Go to File->New, click the Projects tab and select a Win32 Application in the list, also write a name for your project and select a location for it. Click OK, and in the Wizard that pops up select either "An empty project" or "A simple Win32 project", then click OK, and OK again in the info-box that pops up.

Now you have an empty project. Click File->New again, but this time select the Files tab and select the type of file you wish to create in the list (typically C/C++ Source or C/C++ Header), and write a name for the file in the box. Check the little box that says something like "Add file to project" and then click OK.

Typ code in the source file, then select Build->Build. If you get errors, please post the specific error messages. This makes it alot easier to help.


You can also add existing files to a project instead of creating a new one, in the Project->Add to project->File, or by right-clicking the Project-name in the FileView.


If you selected "A simple Win32 project" above, then the project is configured to use precompiled headers, which means that you must #include the "stdafx.h" file at the top of every source file in the project.
Advertisement
thanks! the problem is solved! i selected "A simple win32 project", but didn''t include #include "stdafx.h". without it, i would get a compiler error like "unexpected end of file while looking for precompiled header directive". Thanks again!!!

This topic is closed to new replies.

Advertisement