0
votes

error C1010: unexpected end of file while looking for precompiled header. Did you forgot to add #include "stdafx.h" to your source file?

I have already added #include "stdafx.h" file in my .cpp file

#include "stdafx.h"

msmq()
{

   int a;

    enter code here

}

But when I used Squish coco for code instrumentation at that time they ignore this precompiler file and give me error.

I expect it to instrument my code successfully without giving C1010 error.

I already tried Precompiler Disable option, but it didn't work successfully

1
Coco usage is documented here. Since it seems to invoke the C++ compiler, you'll have to reproduce the same compile options. Use Project > Properties > C/C++ > Command line to see them. Tells you to use /Yu"stdafx.h"Hans Passant
@Hans Passant, already added in Command line. but it's not workMr.Bhavadip Gothadiya
I recommend contacting the vendor of Squish Coco for support.frog.ca
Okay,, i will tryMr.Bhavadip Gothadiya
Did you resolve this? I'm facing the same error and, actually, I'm hating squishcoco.Cartucho

1 Answers

-1
votes

Yes, because of some space error in the header file.

Ensure that between #include and "Header file name" there is only one space.

#include "stdAfx.h" (2 spaces between #include and header file name)

If you give only one space instead of more then one then simply solve it:

#include "stdAfx.h" (only one space) it's work correctly..