Dan
Dan

Reputation: 1338

Why does the Intel compiler miss header file changes in Xcode 5?

I am using the combination of the C++ Compiler XE 14.0 Update 1 and Xcode 5.0.2 running on OS X 10.9.1 and am seeing compilation issues (which is reproducible among 2 of my other colleagues on similar setups).

The problem is the following: any changes to header files within a project are not treated according to expected dependencies and recompilation of respective compilation units and relinking of products is not carried out.

It has to be said that using Apple's LLVM compiler does not exhibit this behaviour.

Workarounds to getting things built right (all impractical) are:

A very simple Xcode project can be created that demonstrates the issue.

  1. Create a new Xcode, blank.
  2. Create a C++ library target - dynamic.
  3. Add two files, e.g. a foo.cpp and a foo.h file
  4. Set the compiler to Intel's C++ XE 14
  5. Build - all is well
  6. Build again - no extra work, all is well
  7. Modify the foo.h file
  8. Build - fails to rebuild correctly.

A link to a sample Xcode project can be found here:

https://github.com/surething/DependencyTest

Once built, any changes to the *.h file does not incur a recompilation and a relink of the generated *.dylib.

Upvotes: 2

Views: 129

Answers (0)

Related Questions