• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Does the header search path ordering matter?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Does the header search path ordering matter?


  • Subject: Does the header search path ordering matter?
  • From: Richard L.Aurbach <email@hidden>
  • Date: Thu, 2 Apr 2009 16:37:56 -0500

Hi, all.

I am STILL trying to get things to work migrating a CodeWarrior project to Xcode. (Grr) 

At the moment, I am getting errors during precompilation which appear to be related to the order in which search paths are processed. Specifically, I have PowerPlant as an external library, so I need to include the PowerPlant headers in the Header Search Path. But, some files in PowerPlant include stdlib++ header files. The search path to find them is added automatically, but AFTER the explicit reference to the PowerPlant path. And the precompiler header doesn't seem to be able to find them.

I.e.

Building target “GP3-ProjectManager” of project “GP3-ProjectManager” with configuration “Debug” — (288 errors, 26 warnings)
   cd /Working/XcProjects/GP3/GP3-ProjectManager
    /Developer/usr/bin/gcc-4.0 -x c++-header -arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Woverloaded-virtual -Wparentheses -Wunused-function -Wunused-label -Wunused-parameter -Wunused-variable -Wunused-value -Wunknown-pragmas -Wshadow -Wshorten-64-to-32 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mfix-and-continue -fvisibility-inlines-hidden -mmacosx-version-min=10.3 -gdwarf-2 "-I/Working/XcProjects/GP3/Intermediates/GP3-ProjectManager.build/Debug/GP3-ProjectManager.build/GP3-Project Manager.hmap" -F/Working/XcProjects/GP3/Output/Debug -I/Working/XcProjects/GP3/Output/Debug/include -I/Working/XcProjects/Open-PowerPlant/FlatPowerPlant -I/Working/XcProjects/GP3/Intermediates/GP3-ProjectManager.build/Debug/GP3-ProjectManager.build/DerivedSources -v -c /Working/XcProjects/GP3/GP3-ProjectManager/GPT_Prefix.pch -o /var/folders/05/05hs1UwG2RWYLE+kNMyVgU+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/GPT_Prefix-bdmqtclzesauuvhjwqlqnjkokvcw/GPT_Prefix.pch.gch
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5490~1/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5490)
 /Developer/usr/bin/../libexec/gcc/i686-apple-darwin9/4.0.1/cc1plus -quiet -v -I/Working/XcProjects/GP3/Intermediates/GP3-ProjectManager.build/Debug/GP3-ProjectManager.build/GP3-Project Manager.hmap -F/Working/XcProjects/GP3/Output/Debug -I/Working/XcProjects/GP3/Output/Debug/include -I/Working/XcProjects/Open-PowerPlant/FlatPowerPlant -I/Working/XcProjects/GP3/Intermediates/GP3-ProjectManager.build/Debug/GP3-ProjectManager.build/DerivedSources -iprefix /Developer/usr/bin/../lib/gcc/i686-apple-darwin9/4.0.1/ -D__DYNAMIC__ -isysroot /Developer/SDKs/MacOSX10.5.sdk /Working/XcProjects/GP3/GP3-ProjectManager/GPT_Prefix.pch -fPIC -quiet -dumpbase GPT_Prefix.pch -mpascal-strings -mfix-and-continue -mmacosx-version-min=10.3 -mtune=generic -march=apple -auxbase-strip /var/folders/05/05hs1UwG2RWYLE+kNMyVgU+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/GPT_Prefix-bdmqtclzesauuvhjwqlqnjkokvcw/GPT_Prefix.pch.gch -gdwarf-2 -O0 -Wno-trigraphs -Wreturn-type -Woverloaded-virtual -Wparentheses -Wunused-function -Wunused-label -Wunused-parameter -Wunused-variable -Wunused-value -Wunknown-pragmas -Wshadow -Wshorten-64-to-32 -version -fmessage-length=0 -fasm-blocks -fvisibility-inlines-hidden -D__private_extern__=extern -o /var/folders/05/05hs1UwG2RWYLE+kNMyVgU+++TI/-Tmp-//ccimrJRG.s --output-pch= /var/folders/05/05hs1UwG2RWYLE+kNMyVgU+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/GPT_Prefix-bdmqtclzesauuvhjwqlqnjkokvcw/GPT_Prefix.pch.gch
ignoring nonexistent directory "/Developer/SDKs/MacOSX10.5.sdk/usr/local/include"
ignoring nonexistent directory "/Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1/../../../../i686-apple-darwin9/include"
ignoring nonexistent directory "/Working/XcProjects/GP3/Output/Debug/include"
ignoring nonexistent directory "/Working/XcProjects/GP3/Intermediates/GP3-ProjectManager.build/Debug/GP3-ProjectManager.build/DerivedSources"
#include "..." search starts here:
#include <...> search starts here:
 /Working/XcProjects/GP3/Intermediates/GP3-ProjectManager.build/Debug/GP3-ProjectManager.build/GP3-Project Manager.hmap (headermap)
 /Working/XcProjects/GP3/Output/Debug (framework directory)
 /Working/XcProjects/Open-PowerPlant/FlatPowerPlant
 /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0
 /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/i686-apple-darwin9
 /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/backward
 /Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1/include
 /Developer/SDKs/MacOSX10.5.sdk/usr/include
 /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks (framework directory)
 /Developer/SDKs/MacOSX10.5.sdk/Library/Frameworks (framework directory)
End of search list.

but 

In file included from /Working/XcProjects/Open-PowerPlant/FlatPowerPlant/UDebugging.h:96,
                 from /Working/XcProjects/AurbachLib/CrossPlatform/Headers/XMacros.h:89,
                 from /Working/XcProjects/AurbachLib/CrossPlatform/Headers/XTypes.h:25,
                 from /Working/XcProjects/AurbachLib/CrossPlatform/Headers/XPreCompile.h:49,
                 from /Working/XcProjects/GP3/GP3-ProjectManager/../CommonSources/GP3_Prefix.h:364,
                 from /Working/XcProjects/GP3/GP3-ProjectManager/GPT_Prefix.pch:38:
/Working/XcProjects/Open-PowerPlant/FlatPowerPlant/LException.h:15:21: error: exception: No such file or directory

where line 15 of .../LException.h is

#include <exception>

==> Maybe I'm looking in completely the wrong place, but it seems to me that gcc is tracing the precompiled header logic into files in the FlatPowerPlant directory, but that processing one of these files requires that a cstdlib file (<exception>) be opened. This file is clearly in /usr/include/c++/4.0.0/, but the compiler can't find it. Is this because the required path hasn't shown up in the search path yet??

Any ideas?

Cheers,

Rick Aurbach
Aurbach & Associates, Inc.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Clear Logs by command-key
  • Next by Date: How to use static libary in Xcode
  • Previous by thread: Re: Clear Logs by command-key
  • Next by thread: How to use static libary in Xcode
  • Index(es):
    • Date
    • Thread