• ### Announcements

#### Archived

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

# Problems with MSVC++

## Recommended Posts

Dr Chi    122
hi. I have the introductory version of MSVC++ 6.00 and I am trying to compile a simple hello world application but I can''t! I followed all the instructions on this page : http://www.cs.virginia.edu/~csadmin/pc/pclabs/vc_faq/vc_intro.html but I get this error message: Compiling... StdAfx.cpp Compiling... lab00.cpp lab00src.cpp c:\program files\microsoft visual studio\myprojects\lab00\lab00src.cpp(15) : fatal error C1010: unexpected end of file while looking for precompiled header directive Generating Code... Error executing cl.exe. lab00.exe - 1 error(s), 0 warning(s) could anyone assist?

##### Share on other sites
Shannon Barber    1681
Start over and use the wizard to setup the project

..or put
  #include "StdAfx.h"

at the top of the .cpp file. You choose to use a precompiled header.

##### Share on other sites
merlin9x9    174
You didn''t happen to have done any silly crap like #include <lab00src.cpp> (including an implementation file), did you? If so, stop it and never do it again.

##### Share on other sites
Dr Chi    122
no I didn''t do anything like that. I did exactly what it said on the webpage above (I posted the address in my last post).

Magmai, I tried that but it didn''t compile.
I see a few wizards but none of them seem suitable.

any other ideas?

btw thanks for the speedy responses!

##### Share on other sites
GBGames    217
Well, that usually is the case when you don''t have a closing } or some other thing that just isn''t matched up properly.
Did you copy and paste?

-------------------------
(Gorgeous graphics)+(beautiful sound effects)+(symphonic music)+(no gameplay) != Good game

##### Share on other sites
SilverWolf    122
Test to put a .h in the includes it might work

##### Share on other sites
GBGames    217
Ok I tried it myself. It compiled fine for me.
I also noticed that StdAfx.cpp is not one of my files.

Compiling...
main.cpp

HWGamedev.exe - 0 error(s), 0 warning(s)

It works fine.
I think the problem is that you picked the wrong kind of Console Application.
See, an empty project works. I think you picked a simple application instead.
Try to start over and see.

-------------------------
(Gorgeous graphics)+(beautiful sound effects)+(symphonic music)+(no gameplay) != Good game

##### Share on other sites
Dr Chi    122
it finally worked, problem solved. you were right about that simple application stuff, GBGames. I was using the other options.
I didn''t realise that it would make such a difference. why does it anyway?

thanks