A question for Ian about his Cucumber/iPhone article. I’m anxious to get his example working. However, I’m struggling a bit to piece everything together. I’m fairly new to xcode, obj-c and iphone dev. and like you this is mostly in my spare time.
I’ve downloaded your source, loaded in to xcode (using WordPress.xcodeproj) and have successfully built and run the Wordpress app in the simulator. It didn’t appear as if the build settings contained the Bromine settings, so I went to the Bromine site and did the following:
I added -DBROMINE_ENABLED=1 to OTHER_CFLAGS, apparently GCC_PREPROCESSOR_DEFINITIONS is the way to go, but adding “BROMINE_ENABLED” didn’t seem to work for me.
I added “/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/usr/include/libxml2” to header search paths.
I think I added the correct libxml2 file to my frameworks group.
Verified GCC_C_LANGUAGE_STANDARD is c99
Building now gives me the following errors:
Building target “WordPress” of project “WordPress” with configuration “Debug” — (3 errors) cd /Users/jclark/dev/iphone/cucumber-article/app setenv MACOSX_DEPLOYMENT_TARGET 10.5 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/gcc-4.0 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.sdk -L/Users/jclark/dev/iphone/cucumber-article/app/build/Debug-iphonesimulator -F/Users/jclark/dev/iphone/cucumber-article/app/build/Debug-iphonesimulator -filelist /Users/jclark/dev/iphone/cucumber-article/app/build/WordPress.build/Debug-iphonesimulator/WordPress.build/Objects-normal/i386/WordPress.LinkFileList -mmacosx-version-min=10.5 -framework Foundation -framework UIKit -framework CoreGraphics -framework SystemConfiguration -framework QuartzCore -o /Users/jclark/dev/iphone/cucumber-article/app/build/Debug-iphonesimulator/WordPress.app/WordPress Undefined symbols: ".objc_class_name_HTTPServer", referenced from: literal-pointer@__OBJC@__cls_refs@HTTPServer in WordPressAppDelegate.o ".objc_class_name_MyHTTPConnection", referenced from: literal-pointer@__OBJC@__cls_refs@MyHTTPConnection in WordPressAppDelegate.o ".objc_class_name_ScriptRunner", referenced from: literal-pointer@__OBJC@__cls_refs@ScriptRunner in WordPressAppDelegate.o ld: symbol(s) not found collect2: ld returned 1 exit status Build failed (3 errors)
Is there something else I need to do to get the HTTPServer built and incorporated in to the app? I’ve successfully built the HTTPServer project, however, I’m not sure how to tie that in to the WordPress app.
Any help you can provide would be greatly appreciated.