The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   Omni Frameworks (http://forums.omnigroup.com/forumdisplay.php?f=16)
-   -   Xcode 4. (http://forums.omnigroup.com/showthread.php?t=20683)

jgarnham 2011-04-13 05:09 AM

Xcode 4.
 
After hours of trying to get this to work I have one single question… how on earth can you use the Omni Frameworks with Xcode 4?

What I've done is created a workspace added all the separate Frameworks in required to run the TextEditor example, like so:

[IMG]http://idzr.org/yi7x[/IMG]

And build each one, one by one. All was fine, so i tried to build the TextEditor example but oh no Xcode 4 wouldn't have it, throwing errors such as these:

[IMG]http://idzr.org/3n4v[/IMG]

Why do I get these errors when I have build each and every single framework in the workspace and they are all build into the same place.

Also, I have one final question. Do you guys at OmniGroup use Xcode 4?

Tim Wood 2011-04-14 07:57 AM

Unfortunately, Xcode 4's automatic dependency checking can't determine when two targets have a dependency on each other due only to imports.

For example, OmniUI depends on OmniBase having been built so that it can include <OmniBase/...>. When building on the Mac, Xcode 4 *can* determine this via the framework linking, but we can't link the iOS static libraries against each other.

So, the short answer is that if you select Edit Scheme… from the Scheme popup, pick the Build action in your scheme and then uncheck Parallelize Build and Find Implicit Dependencies, it will work much better. You'll also need to tell it to build FixStringsFile before building the TextEditor (click on the + in the bottom left of the Build tab, pick FixStringsFile and put it at the top of build list.

jgarnham 2011-04-16 10:20 AM

Okay, I've got a bit further now. This is what my target looks like now:

[IMG]http://idzr.org/8omc[/IMG]

It all builds fine until right at the end with the actual project itself when I get this 'Mach-O' linker error:

[URL="http://idzr.org/cwvk"][Image to large to embedded][/URL]

Thanks very much for your help so far. :)

Tim Wood 2011-04-18 09:37 AM

When building TextEditor, you shouldn't need the Mac variants (so, you should just need "OmniBaseTouch" instead of "OmniBase", for example).

As for the SenTestingKit issue, it looks like I added a reference to that under /Developer/Library/Frameworks/SenTestingKit.framework in the TextEditor project (the default Xcode install location). You could change this to refer to it via your '/Xcode 4' install location, or try to use one of the variables ("$(DEVELOPER_DIR)" or the like).

But, longer term, we'll probably stop using SenTestingKit since it isn't available on devices unless the device has had its "Use for Development" bit flipped. In our current internal builds we have these tests only running on the Mac, but we'll probably be switching to GHUnit or one of the other testing frameworks that we can actually build from source.

jgarnham 2011-04-22 05:35 AM

I've removed all the Mac variants just to make sure they weren't causing any problems, which they weren't.

But the missing framework error for SenTestingKit wouldn't go away even though it exists in both /Developer/Library/Frameworks AND /Xcode 4/Library/Frameworks. So i re-added the framework, and it got rid of that error. But than i get 19 more, which are completely unrelated. If your interested take a look at the image [URL="http://idzr.org/ekuk"]here[/URL].

To be honest, I've given up on Xcode 4 and am going to stick with Xcode 3.2 when working with the framework.

nickplee 2011-05-09 03:35 PM

I'm having the same issue with the same linker errors. I can get it to build in the sample project provided but not my own. There must be something obvious. It also says OBFinishPorting is undeclared, which leads me to believe that some dependency is missing. HELP!?

Tim Wood 2011-05-10 06:33 AM

Late last week I pushed a new framework update that has a top-level Workspaces directory, currently containing one workspace showing how we build TextEditor for iOS. This may help better explain how we set things up.

sanniv 2011-05-24 08:25 PM

Resolved OBFinishPorting is undeclared
 
[QUOTE=nickplee;97001]I'm having the same issue with the same linker errors. I can get it to build in the sample project provided but not my own. There must be something obvious. It also says OBFinishPorting is undeclared, which leads me to believe that some dependency is missing. HELP!?[/QUOTE]

Hi Nickplee,

try adding following in your <appname>_Prefix.pch

#import <OmniBase/OmniBase.h>
#import <OmniFoundation/OFNull.h>
#import <OmniFoundation/NSString-OFSimpleMatching.h>

it should resolve your issue...


All times are GMT -8. The time now is 08:08 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.