visual c++ .net compile problem... odd fatal error

This is a discussion on visual c++ .net compile problem... odd fatal error within the Windows Programming forums, part of the Platform Specific Boards category; Hi, This is the first project I have done using the .NET version of the visual C++ compiler. When I ...

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    132

    visual c++ .net compile problem... odd fatal error

    Hi,

    This is the first project I have done using the .NET version of the visual C++ compiler. When I went to compile my windows code I got an error that said C1010: unexpected end of file while looking for the precompiled header directive? I've had an unexpected end of file error before, but never this one. Has anyone else ever run into this issue?

  2. #2
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    Are you using precompiled headers? If not, you need to unset that option in the project settings. If you are, make sure the file "StdAfx.h" or whatever your precompiled header is named, is included first in every cpp file.
    "...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,558
    Just do a search for "precompiled header"

    Then just turn off the feature inside the project settings.

    It's just some lame attempt at "improving" the build times of projects, which might have been a good idea a decade or two ago, but it refuses to go away nontheless.

    It's also a way of locking your code into their compiler if you decide to make use of it, but that's another story.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  4. #4
    Registered User
    Join Date
    May 2002
    Posts
    132
    Ya I get it now. I didn't check the "Empty Project" option and ended up with that I am sillyI am sillyI am sillyI am silly already in my project.

    Thanks, it's fixed now.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Testing some code, lots of errors...
    By Sparrowhawk in forum C Programming
    Replies: 48
    Last Post: 12-15-2008, 03:09 AM
  2. Errors including <windows.h>
    By jw232 in forum Windows Programming
    Replies: 4
    Last Post: 07-29-2008, 01:29 PM
  3. Quantum Random Bit Generator
    By shawnt in forum C++ Programming
    Replies: 62
    Last Post: 06-18-2008, 10:17 AM
  4. How to monitor process creation?
    By markiz in forum Windows Programming
    Replies: 31
    Last Post: 03-17-2008, 02:39 PM
  5. Linking error
    By DockyD in forum C++ Programming
    Replies: 10
    Last Post: 01-20-2003, 04:27 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21