Unable to build using Xcode 4 - The selected run d

2019-03-08 11:49发布

So I'm horribly confused by this error, other threads on Stack Overflow mention I should set the SDK, but I see no option to do this. I'm trying to build:http://wafflesoftware.net/shortcut/

And I get no options, and I can only choose My Mac 64-bit, and I want it in 32-bit. Really beginning to hate Xcode 4.

Here is the screenshot when I try to edit my scheme: http://groovyape.com/scheme.png

Thoughts?

12条回答
不美不萌又怎样
2楼-- · 2019-03-08 12:27

Xcode 4.5. I was trying to compile for 10.6. It seemed to be stuck on 64 bit just because it couldn't find the sdk. I didn't get any message about it not finding the sdk.

I first tried to put in the correct path to /Developer-3.2.6/SDKs/MacOSX10.6.sdk but xcode didn't want to find it there. Then I copied that folder into 4.5 next to the other OSX Platform sdk (new location I think just look in the bundle).

And magically my 32 bit came back.

So my conclusion is that the 32/64 bit option is really dependent on whether xcode can verify the sdk that you're trying to use. Being stuck at 64 while trying to compile for 32 gives the error without notifying you that its first issue is that the sdk can't be found.

查看更多
太酷不给撩
3楼-- · 2019-03-08 12:30

I found a good practice for moving from Xcode 3.2.X to Xcode 4 is, to remove any references to older SDKs (in the case of Mac OS to remove any Base SDK Ref, etc., for Mac OS <= 10.5, in the case of iOS I think you need to remove everything <= 4.3) PRIOR to upgrading to Xcode 4.

I never experienced any problems for new Projects, created in Xcode 4, only for such that where created with Xcode 3.X or 2.X

查看更多
相关推荐>>
4楼-- · 2019-03-08 12:36

It sounds as if you're trying to run (Cmd-R or run button) the framework (which you can't do - it's not an executable, just a library) rather than simply build it (Cmd-B).

查看更多
爷的心禁止访问
5楼-- · 2019-03-08 12:38

Ran into the same error message ("The selected run destination is not valid for this action") when attempting to use XCode 4 to build/run a tiny Objective-C "Hello, World" project I created in XCode 3.x. Fixed it by choosing to "Manage Schemes..." from the drop-down menu to the right of the Stop button, deleting the one scheme on the list (click checkbox beside the scheme, then click the "-" button at the bottom left), and then clicking "Autocreate Schemes Now".

I also needed to change the "Base SDK" from 10.5 to 10.6, by clicking on 'folder' icon (beneath the Run button), clicking the root/top of the tree view below it, clicking on the blue icon below "PROJECT" in the pane just to the right, and then finally, choosing "Latest Mac OS X (Mac OS X 10.6)" to the right of that.

查看更多
萌系小妹纸
6楼-- · 2019-03-08 12:39

This will happen if XCode believes your mac is a 64-bit machine, when really it's a 32-bit. If this is the case for you, simply click on your project icon from the far-left pane - it's the menu item that displays your project name next to a little blue icon. This should bring up a center pane that says "PROJECT" at the top. Highlight your project name, and the third pane should now show your build settings. The first item is "Architectures" which will allow you to specify if you are building a 32-bit or 64-bit application.

查看更多
萌系小妹纸
7楼-- · 2019-03-08 12:43

If this happened after you renamed your app, go to Schemes -> Edit Scheme -> Run <YourApp> -> Info Select the right executable file (YourApp.app)

Another way is to select None as executable and then reselect the YourApp.app from your Debug-iPhoneOS folder.

查看更多
登录 后发表回答