openframeworks.cc + xcode 3.2.3 > iPad: problems

I’ve spent too much time already trying to coax a successful build out of OFX, have given up and will work with libcinder for a while.

But I’ll keep on the lookout for new releases of ofx as I think it’s got lots of potential (and functionality… if only I could get my hands on it) and the user community is replete with talent (I’ve seen some pretty amazing stuff coming from this crowd).

And I’d like to make a wish for an ofx distrib that compiles cleanly with <latest iOS SDK + xcode version> at first try. In my case, I was running Xcode 3.2.3, trying to compile Theo’s iPhoneGuiExample for an iPad running 3.2.1, when I let out the final argh!

Alex

we’re working on a package for iOS 4.0, and will let you know when it’s up – sorry that’s it’s taken a while to get up, but as it’s open source, and a project that we do in addition to the work that pays the bills, we don’t always have support in place when sdk / OS / IDEs change, etc. We’re working on faster releases, and working on this latest release now.

in the meantime, the community has opened some threads on solving 4.0 issues, and there are people working fine with that version of iOS. Frustrate not… There’s some info here / and in japanese:

http://forum.openframeworks.cc/t/xcode-3.2.3-±iphone-sdk-4-beta-works-with-ofxiphone/3658/0
http://yoppa.org/iphone10/1436.html

Did you post on this thread? I can only find you posting about memo’s github branch (which is a work in progress) and that you had success with 0.061 and 3.2 SDK…

at any rate, you’re always welcome round here &
take care,
zach

Thanks a lot Zach. I know. Bills to pay… And I have a lot of respect for what people have done with ofx. And that’s why I tried.

Basically, things were working fine until I was forced to upgrade xcode to 3.2.3 (includes iOS 4) because xcode 3.2.2 would not provision my iPad (OS 3.2.1).

And since then it’s been sticky.

a. Framework paths are set to Relative to Current SDK, which should work, except that Current SDK path seems to be set to inside the example app folder, e.g., /Users/me/dev-local/openFrameworks/apps/iPhoneExamples/fontsExample/iphoneos2.2.1/System/Library/Frameworks/AudioToolbox.framework. Easy enough to fix. Xcode may have gotten confused because I install different SDKs at system root level, e.g., /Xcode-3.2.3/, /Xcode-3.2.2/, etc.

b. Build fails at that point because Poco libs are not found. All app examples for iPhone point to libs/poco/lib/iphone, when in fact the ofx disty places them under libs/poco/lib/armv6/. Easy enough to fix (BTW, it looks like iPad builds may require that libs be compiled for armv7 architecture).

c. Build fails again, reporting invalid DWARF. So I looked it up in the forums and folllowed stuartmemo’s recommendation (copy FreeImage/lib/osx/freeimage.a to iphone and rename it to libFreeImage_iphone_universal.a).

d. Build worked, but reporting the Copy Bundle Resource error. Fixed that too.

So then I had a running font example app. Great. So I then decided to repeat a to d for the iPhoneGuiExample.

And then it worked! So documenting my problems solved them. I guess it was my fault. Great. But you know what, I’m tired. Anyway, now that it works, I guess I have no reason to head over to libcinder (well documented, not all over the place, but more limited than ofx and so slow to link that it kills flow).

Case closed, for now.

:slight_smile:
Alex

Oh I see that you say “memo’s github branch (which is a work in progress)”.

I got the latest distrib from http://github.com/openframeworks/openFrameworks. This is the right place, right?

Thanks
Alex

case closed

… and reopened.

iPhoneAdvancedGraphicsExample won’t build:

  
"_FreeImage_DeInitialise", referenced from:  
ofCloseFreeImage()     in libofxiPhoneOFLib_iphoneos _Debug.a(ofImage.o)  
ld: symbol(s) not found  
  

Thanks in advance
Alex

I was able to rebuild the FreeImage sources using modified versions of Jeff Crouse’s Makefile.iphone makefiles – I keep separate Xcode versions at system root level (/Xcode-3.2.2, /Xcode-3.2.3, etc), forcing me to make some changes. I’m attaching the file to this email if anyone has a similar setup.

Now able to launch test app in both iPad and iPhone OS4 simulators.

Console logs the same error for both, though:

  
TestApp-OFX-iOS-A1[19189:207] Creating OpenGL ES2 Renderer  
TestApp-OFX-iOS-A1[19189:207] Failed to load vertex shader  
TestApp-OFX-iOS-A1[19189:207] Failed to compile vertex shader  
TestApp-OFX-iOS-A1[19189:207] OpenGL ES2 failed  
TestApp-OFX-iOS-A1[19189:207] Creating OpenGL ES1 Renderer  
  

After which the iPad version keeps working fine (a simple doodle test) while the iPhone OS4 app freezes and shuts down seconds later.

Alex

Makefile.iphone.zip

sorry, which version of OF is this – is this the one off of our download page, or on github?

From your errors, looks like github:

http://github.com/memo/openFrameworks/b-…-enderer.mm

If it’s trying to work with opengles 2.0, then it’s definitely a work in progress.

Can you try the same thing you’ve done, but with the 0.061 package that’s on openframeworks.cc/download

take care,
zach

I used the github (what with it being official and all, per openframeworks.cc).

So I downloaded of_preRelease_v0061_iPhone_FAT-pre3, opened iPhoneTouchAndAccelExample.xcodeproj, built and ran into that invalid dwarf again. Once I had removed the reference to libFreeImage_iphone_universal.a from the project and added my recently compiled FreeImage libs (libfreeimage-iphone.a and libfreeimage-iphonesimulator.a), TouchAndAccelExample, augmented with an ofImage (to test FreeImage) built&ran perfectly.

So I’m all good for now & thanks a lot for your help, Zach. Much appreciated.
Alex

Edit:

PS: is it okay if I rename this thread to something less alarming than “moving on to libcinder”? I googled for “openframeworks libcinder” yesterday and saw my post right at the top of the results page; not what I wanted.

I just did. Hope it’s okay.