•      Sign In
• Create Account

Problems with MSVC++

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

8 replies to this topic

#1Dr Chi  Members

122
Like
Likes
Like

Posted 27 January 2002 - 06:36 PM

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?

#2Shannon Barber  Moderators

1657
Like
Likes
Like

Posted 27 January 2002 - 06:44 PM

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.

#3merlin9x9  Members

174
Like
Likes
Like

Posted 27 January 2002 - 06:47 PM

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.

#4Dr Chi  Members

122
Like
Likes
Like

Posted 27 January 2002 - 07:03 PM

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!

#5GBGames  Members

182
Like
Likes
Like

Posted 27 January 2002 - 07:18 PM

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

#6SilverWolf  Members

122
Like
Likes
Like

Posted 27 January 2002 - 07:20 PM

Test to put a .h in the includes it might work

#7GBGames  Members

182
Like
Likes
Like

Posted 27 January 2002 - 07:29 PM

Ok I tried it myself. It compiled fine for me.
I also noticed that StdAfx.cpp is not one of my files.
All I had was main.cpp

Compiling...
main.cpp
Linking...

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

#8Dr Chi  Members

122
Like
Likes
Like

Posted 28 January 2002 - 04:03 PM

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

#9Narcus  Members

122
Like
Likes
Like

Posted 29 January 2002 - 06:50 AM

I always start with an empty application, I don''t understand that stdafx.h either, but it''s messed me up before so I steer clear of it. Maybe somebody can enlighten us?

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.