I'm trying to create a C++ static library in Visual Studio Express 2013 for Windows Desktop (v12.0.30723.00 Update 3). I don't want to use precompiled headers in my library. I can't get the most basic project to compile without errors.
The problem can be easily duplicated as follows:
I get the following two errors:
1 error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source? AssemblyInfo.cpp 39 1 ClassLibrary1
2 error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source? ClassLibrary1.cpp 7 1 ClassLibrary1
Am I missing a step, or have I found a bug in this version of Visual Studio?
Sometimes you can spend hours scratching your head over something that has a very basic solution. In this case, the Active configuration was Debug, but I was changing the Precompiled Header option for the Release configuration. When I changed the option in the Debug configuration, voila! no more errors.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With