5

Getting this error building a C++ project in VS2008. Very confused what it means, why does it think WIN32 is a file?

7
  • You have anything like #include<win32> in your code may be?
    – Naveen
    Dec 7, 2010 at 10:39
  • 1
    Thou shalt not ask such questions without providing source code! Dec 7, 2010 at 10:39
  • What is the type of project ? Win32 , console or MFC ? See this thread:social.msdn.microsoft.com/forums/en-US/vcgeneral/thread/… Dec 7, 2010 at 10:41
  • You want hundreds of files? I don't know where it's from, if I did I'd know where the problem is!
    – Mr. Boy
    Dec 7, 2010 at 10:41
  • @Madhur... how do you know after a project is created which was picked?
    – Mr. Boy
    Dec 7, 2010 at 10:42

2 Answers 2

13

Go to Project-->Properties-->C/C++-->Command line. You most probably have a /I"" before your /D "WIN32". For some reason an empty include directive causes the /D to evaporate hence your error.

Go to Project-->Properties-->C/C++-->General-->Additional include directories and make sure there are no redundant chars there.

It can for example arise when the last include directory is a reference to an environement variable that doesn't exist.

1
  • Yup. Post the content in the question if that doesn't help. Dec 7, 2010 at 13:24
2

the /I "" is most likely caused by undefined environment variables, e.g. If you have /I $(BOOSTROOT), then you will get /I "" and it will eat the next token '/D' and leaving WIN32 as a file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.