c++ - Relative headers XCode 4 -


i've been trying port pthread classes on ios. such have moved them across xcode project subdirectory main files called "threading".

however can't compile. in pthreadthread.cpp, example, has

 #include "threading/pthreadthread.h" 

and yet xcode returns me error saying can't find header. i'm assuming because looking directory header in. such adding "../" on front seem help, not solution, imo.

so found thread:

xcode 4 relative #include paths in search?

but on trying solution doesn't seem work. first thing noticed actual source data under $srcroot/ added in (firstly under user header paths , then, because didn't work, under normal header paths) , ... still doesn't work.

whats going on? how can relative header including work?

edit: command line looks this

compilec /users/oscarforth/library/developer/xcode/deriveddata/voiceanalyser-baxcnwbmyjmkfncxfxoaltcqbrzr/build/intermediates/voiceanalyser.build/debug-iphonesimulator/voiceanalyser.build/objects-normal/i386/pthreadthread.o voiceanalyser/threading/pthreadthread.cpp normal i386 c++ com.apple.compilers.llvm.clang.1_0.compiler     cd "/volumes/dev disk/development/oxford wave research/voiceanalyser"     setenv lang en_us.us-ascii     setenv path "/developer/platforms/iphonesimulator.platform/developer/usr/bin:/developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"     /developer/platforms/iphonesimulator.platform/developer/usr/bin/clang -x c++ -arch i386 -fmessage-length=0 -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -wno-trigraphs -fpascal-strings -o0 -wmissing-prototypes -wreturn-type -wparentheses -wswitch -wno-unused-parameter -wunused-variable -wunused-value -wno-shorten-64-to-32 -ddebug=1 -isysroot /developer/platforms/iphonesimulator.platform/developer/sdks/iphonesimulator5.0.sdk -fexceptions -fasm-blocks -mmacosx-version-min=10.6 -gdwarf-2 -fvisibility-inlines-hidden -d__iphone_os_version_min_required=40000 -iquote /users/oscarforth/library/developer/xcode/deriveddata/voiceanalyser-baxcnwbmyjmkfncxfxoaltcqbrzr/build/intermediates/voiceanalyser.build/debug-iphonesimulator/voiceanalyser.build/voiceanalyser-generated-files.hmap -i/users/oscarforth/library/developer/xcode/deriveddata/voiceanalyser-baxcnwbmyjmkfncxfxoaltcqbrzr/build/intermediates/voiceanalyser.build/debug-iphonesimulator/voiceanalyser.build/voiceanalyser-own-target-headers.hmap -i/users/oscarforth/library/developer/xcode/deriveddata/voiceanalyser-baxcnwbmyjmkfncxfxoaltcqbrzr/build/intermediates/voiceanalyser.build/debug-iphonesimulator/voiceanalyser.build/voiceanalyser-all-target-headers.hmap -iquote /users/oscarforth/library/developer/xcode/deriveddata/voiceanalyser-baxcnwbmyjmkfncxfxoaltcqbrzr/build/intermediates/voiceanalyser.build/debug-iphonesimulator/voiceanalyser.build/voiceanalyser-project-headers.hmap -iquote/volumes/dev -iquotedisk/development/oxford -iquotewave -iquoteresearch/voiceanalyser -i/users/oscarforth/library/developer/xcode/deriveddata/voiceanalyser-baxcnwbmyjmkfncxfxoaltcqbrzr/build/products/debug-iphonesimulator/include -i/users/oscarforth/library/developer/xcode/deriveddata/voiceanalyser-baxcnwbmyjmkfncxfxoaltcqbrzr/build/intermediates/voiceanalyser.build/debug-iphonesimulator/voiceanalyser.build/derivedsources/i386 -i/users/oscarforth/library/developer/xcode/deriveddata/voiceanalyser-baxcnwbmyjmkfncxfxoaltcqbrzr/build/intermediates/voiceanalyser.build/debug-iphonesimulator/voiceanalyser.build/derivedsources -f/users/oscarforth/library/developer/xcode/deriveddata/voiceanalyser-baxcnwbmyjmkfncxfxoaltcqbrzr/build/products/debug-iphonesimulator -include /users/oscarforth/library/developer/xcode/deriveddata/voiceanalyser-baxcnwbmyjmkfncxfxoaltcqbrzr/build/precompiledheaders/voiceanalyser-prefix-dzvjbuvabxhsdtfseyyxyapbsuqv/voiceanalyser-prefix.pch -c "/volumes/dev disk/development/oxford wave research/voiceanalyser/voiceanalyser/threading/pthreadthread.cpp" -o /users/oscarforth/library/developer/xcode/deriveddata/voiceanalyser-baxcnwbmyjmkfncxfxoaltcqbrzr/build/intermediates/voiceanalyser.build/debug-iphonesimulator/voiceanalyser.build/objects-normal/i386/pthreadthread.o  in file included /volumes/dev disk/development/oxford wave research/voiceanalyser/voiceanalyser/threading/pthreadthread.cpp:1: /volumes/dev disk/development/oxford wave research/voiceanalyser/voiceanalyser/threading/../threading/pthreadthread.h:44:10: fatal error: 'threading/pthreadevent.h' file not found [2]  #include "threading/pthreadevent.h"           ^ 1 error generated. 

be careful how xcode interprets path spaces. in case,

-i/volumes/macintosh hd/users/... 

becomes

-i/volumes/macintosh -ihd/users/... 

check paths in project settings header search path , add double quote path.

"$(project_dir)/yourlibrary" 

instead of

$(project_dir)/yourlibrary 

this issue got me when tried load project non-boot volume


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -