PDA

View Full Version : VSAddin bug with precompiled headers?



indiocolifa
3rd November 2009, 20:13
I'm getting a hard time using precompiled headers in my Qt+VS2008 project.

I'm using the following directives, as usual:

CONFIG += precompile_header
PRECOMPILED_HEADER = stdafx.h
HEADERS += stdafx.h

The problem is that every MOC file generated is including

#include "stdafx.h"

Of course this file cannot be found since MOC is generating the files on the /debug and /release folders where stdafx.h does not exist.

Anyone hit the same problem?

squidge
3rd November 2009, 22:06
Of course this file cannot be found since MOC is generating the files on the /debug and /release folders where stdafx.h does not exist. Whats wrong with adding the directory where stdafx.h DOES exist to your include search paths?

indiocolifa
5th November 2009, 22:44
Whats wrong with adding the directory where stdafx.h DOES exist to your include search paths?

Nothing, but this is not documented anywhere.

percywang
28th May 2013, 06:48
Did you fix it? I have the same problem now... Thx