iosxcode4three20

Three20 doesn't compile on iOS Device cause _searchController not defined in TTTableViewController subclass


I've a TTTableViewController subclass. In the loadView I'm assigning the searchBar to the headerView as shown in TTCatalog:

self.tableView.tableHeaderView = _searchController.searchBar;

When I compile for iPhone Simulator all is ok; when I compile for iOS Device compiler give me an error saying _searchController is undefined.

Someone can point me to the right direction?? I already tried some other solution found here and on net... but nothing seems to resolve the issue...

Below the compiler output (a little long):

CompileC /Users/Luca/Library/Developer/Xcode/DerivedData/QShopping-eggzghjfaglpblfzueetmvwsljou/Build/Intermediates/QShopping.build/Debug-iphoneos/QShopping.build/Objects-normal/armv7/SearchProducts.o QShopping/Classes/SearchProducts.m normal armv7 objective-c com.apple.compilers.llvmgcc42 cd /Users/Luca/Dropbox/XcodeProjects/QShopping setenv LANG en_US.US-ASCII setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 -x objective-c -arch armv7 -fmessage-length=0 -pipe -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wunused-variable -DDEBUG -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk -gdwarf-2 -mthumb -miphoneos-version-min=4.0 -iquote /Users/Luca/Library/Developer/Xcode/DerivedData/QShopping-eggzghjfaglpblfzueetmvwsljou/Build/Intermediates/QShopping.build/Debug-iphoneos/QShopping.build/QShopping-generated-files.hmap -I/Users/Luca/Library/Developer/Xcode/DerivedData/QShopping-eggzghjfaglpblfzueetmvwsljou/Build/Intermediates/QShopping.build/Debug-iphoneos/QShopping.build/QShopping-own-target-headers.hmap -I/Users/Luca/Library/Developer/Xcode/DerivedData/QShopping-eggzghjfaglpblfzueetmvwsljou/Build/Intermediates/QShopping.build/Debug-iphoneos/QShopping.build/QShopping-all-target-headers.hmap -iquote /Users/Luca/Library/Developer/Xcode/DerivedData/QShopping-eggzghjfaglpblfzueetmvwsljou/Build/Intermediates/QShopping.build/Debug-iphoneos/QShopping.build/QShopping-project-headers.hmap -I/Users/Luca/Library/Developer/Xcode/DerivedData/QShopping-eggzghjfaglpblfzueetmvwsljou/Build/Products/Debug-iphoneos/include -I/Users/Luca/Library/Developer/Xcode/DerivedData/QShopping-eggzghjfaglpblfzueetmvwsljou/Build/Products/Debug-iphoneos/../three20 -I/Users/Luca/Library/Developer/Xcode/DerivedData/QShopping-eggzghjfaglpblfzueetmvwsljou/Build/Products/Debug-iphoneos/../../three20 -I../three20/Build/Products/three20 -I/Users/Luca/Dropbox/XcodeProjects/QShopping/RestKit/Build -I/Users/Luca/Library/Developer/Xcode/DerivedData/QShopping-eggzghjfaglpblfzueetmvwsljou/Build/Products/Debug-iphoneos/../../three20 -I/Users/Luca/Library/Developer/Xcode/DerivedData/QShopping-eggzghjfaglpblfzueetmvwsljou/Build/Intermediates/QShopping.build/Debug-iphoneos/QShopping.build/DerivedSources/armv7 -I/Users/Luca/Library/Developer/Xcode/DerivedData/QShopping-eggzghjfaglpblfzueetmvwsljou/Build/Intermediates/QShopping.build/Debug-iphoneos/QShopping.build/DerivedSources -F/Users/Luca/Library/Developer/Xcode/DerivedData/QShopping-eggzghjfaglpblfzueetmvwsljou/Build/Products/Debug-iphoneos -include /Users/Luca/Library/Developer/Xcode/DerivedData/QShopping-eggzghjfaglpblfzueetmvwsljou/Build/PrecompiledHeaders/QShopping-Prefix-equrcyqgwoemcbaiznvexuztfkfm/QShopping-Prefix.pch -c /Users/Luca/Dropbox/XcodeProjects/QShopping/QShopping/Classes/SearchProducts.m -o /Users/Luca/Library/Developer/Xcode/DerivedData/QShopping-eggzghjfaglpblfzueetmvwsljou/Build/Intermediates/QShopping.build/Debug-iphoneos/QShopping.build/Objects-normal/armv7/SearchProducts.o

/Users/Luca/Dropbox/XcodeProjects/QShopping/QShopping/Classes/SearchProducts.m: In function '-[SearchProducts loadView]': /Users/Luca/Dropbox/XcodeProjects/QShopping/QShopping/Classes/SearchProducts.m:121: error: '_searchController' undeclared (first use in this function) /Users/Luca/Dropbox/XcodeProjects/QShopping/QShopping/Classes/SearchProducts.m:121: error: (Each undeclared identifier is reported only once /Users/Luca/Dropbox/XcodeProjects/QShopping/QShopping/Classes/SearchProducts.m:121: error: for each function it appears in.) /Users/Luca/Dropbox/XcodeProjects/QShopping/QShopping/Classes/SearchProducts.m: In function '-[SearchProducts textField:didSelectObject:]': /Users/Luca/Dropbox/XcodeProjects/QShopping/QShopping/Classes/SearchProducts.m:180: error: '_searchController' undeclared (first use in this function)

Solution

  • Well, I resolved changing compiler from GCC 4.2 (System Default) to LVVM 2.