x


Undefined symbols for architecture i386: with 200+ apple mach-o linker (Id) errors

I have just purchased Unity iOS 3.4.2f2 and am running it on an Apple Macbook running 10.6.8 Snow Leopard. I am using XCode 4.2 on the same computer.

I have tried several simple example Unity projects and have run the default build for iOS and when I try to build them in XCode for the iPhone 5.0 Simulator, I get the following 201 apple mach-o linker (Id) errors:

ld: warning: ignoring file /Users/Shared/Unity/TestProj/iOSbuild/Libraries/libiPhone-lib.a, missing required architecture i386 in file

Undefined symbols for architecture i386:

"UnityUse32bitDisplayBuffer()", referenced from: CreateWindowSurface(EAGLView, unsigned int, unsigned int, unsigned int, bool, EAGLSurfaceDesc) in AppController.o OpenEAGL_UnityCallback(UIWindow*, int, int, int) in AppController.o

"UnityGetTargetResolution()", referenced from: CreateSurface(EAGLView, EAGLSurfaceDesc) in AppController.o

"UnitySetInputScaleFactor(float)", referenced from: CreateSurface(EAGLView, EAGLSurfaceDesc) in AppController.o

...201 apple mach-o linker (Id) errors.

I get the same build errors with all Unity iOS projects I have tried.

Over the past couple of weeks, I have attempted all of the fixes suggested in the unityAnswers forum and have had no success whatsoever.

As a new user, I am probably missing something obvious for you experienced guys. It is stopping me dead in the water from progressing onto any useful app development.

Please point me in the right direction, so that I can move forward with my work.

more ▼

asked Jan 04 '12 at 01:11 PM

Hermes gravatar image

Hermes
1 3 3 4

Following further reading in the forums, it has become apparent to me that the default build of and iOS project from Unity is missing one or more classes - hence the referenced methods. From the names of all these methods, they appear to all be standard Unity functionality and presumably are contained in a Unity framework. I can find no mention of such a base Unity framework and would expect that such a framework would automatically be added to a default iOS build from a simple model (a box!). Building such a Unity iOS build in XCode consistently fails for me with the same 200+ method reference errors.

Can anyone please tell me what I am missing in the Unity iOS builds that is causing this catastrophic failure?

Jan 12 '12 at 12:59 AM Hermes
(comments are locked)
10|3000 characters needed characters left

4 answers: sort voted first

Set the Unity build settings to iOS device and run the build. Then in Xcode, plug your iOS device into your computer and select the device name at the top of the screen and press the run arrow button to build and run the app on your physical iOS device.

Hope this answers your question.

more ▼

answered Dec 05 '12 at 02:39 AM

Hermes gravatar image

Hermes
1 3 3 4

(comments are locked)
10|3000 characters needed characters left

It worked! Thanks

more ▼

answered Dec 04 '12 at 02:56 AM

gegagome gravatar image

gegagome
15

(comments are locked)
10|3000 characters needed characters left

I figured it out!

Being new to Unity iOS and XCode, I didn't realise you need to set the Unity Player Settings SDK Version to iOS Simulator to have XCode build and run in the iPhone simulator. Hence the "Undefined symbols for architecture i386:" errors. Makes sense now.

Runs in the simulator and on the physical iPhone now.

Very disappointed that over 200 viewers of this question and nobody even made a suggestion to point me in the right direction on such a novice error.

more ▼

answered Jan 30 '12 at 12:50 PM

Hermes gravatar image

Hermes
1 3 3 4

thanks, that solved my problem too.

Oct 17 '12 at 11:59 AM JeanLuc

Worked for me too, thanks! ;)

Oct 29 '12 at 04:11 PM Aday
(comments are locked)
10|3000 characters needed characters left

How did you archive to iOS device? I am stuck in this part.

more ▼

answered Dec 05 '12 at 12:49 AM

gegagome gravatar image

gegagome
15

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1967
x1951
x347
x12
x5

asked: Jan 04 '12 at 01:11 PM

Seen: 4936 times

Last Updated: Dec 05 '12 at 02:39 AM