precompiled header .pch files are machine sensitive?

Posted by fresky on Stack Overflow See other posts from Stack Overflow or by fresky
Published on 2010-04-08T06:32:57Z Indexed on 2010/04/08 7:53 UTC
Read the original article Hit count: 544

Filed under:
|
|
|

Hi, experts,

I tried to reuse the .pch to speed the build using the following way:

  1. use /Yc on stdafx.cpp to create the .pch files to a folder
  2. exclude stdafx.cpp in the project, and modify the link option

It success in my machine, but failed in another, got the error message: error C2011: '*' : 'struct' type redefinition

So first I want to ask whether the .pch files are machine sensitive? then secondly, the above approaches workable?

Thanks!

© Stack Overflow or respective owner

Related posts about c++

Related posts about build