Linker error when building project

I’m not sure what I did or did not do… I already have one application; it runs and builds without any problem. The second application that I am working on, I just tried to build to test on my device. I receive one error during the linking phase of the build.

Ld build/amazeing.app/amazeing normal armv6
cd /Users/Andrew/test_angle/A-maze-ing
setenv IPHONEOS_DEPLOYMENT_TARGET 3.1
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.sdk -L/Users/Andrew/test_angle/A-maze-ing/build -L/Users/Andrew/test_angle/A-maze-ing -L/Users/Andrew/test_angle/A-maze-ing/Libraries -F/Users/Andrew/test_angle/A-maze-ing/build -filelist /Users/Andrew/test_angle/A-maze-ing/build/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv6/amazeing.LinkFileList -dead_strip -Wl,-S,-x -miphoneos-version-min=3.1 -framework Foundation -framework UIKit -framework OpenGLES -framework QuartzCore -framework OpenAL -liconv.2 -liPhone-lib -framework AudioToolbox -framework CFNetwork -framework MediaPlayer -framework CoreLocation -framework SystemConfiguration -o /Users/Andrew/test_angle/A-maze-ing/build/amazeing.app/amazeing

ld: ldr 12-bit displacement out of range (5224 max +/-4096) in _AudioQueueAddPropertyListener$stub in _AudioQueueAddPropertyListener$stub from /Users/Andrew/test_angle/A-maze-ing/build/amazeing.app/amazeing
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 failed with exit code 1

I’ve tried to alter the settings of my project to be exactly the same as the first application (changing build target, etc.). I created a new development profile for this app and made the identifier unique, so there wouldn’t be a problem. What am I overlooking? Or is it not my device at all?

Thanks,

kieblera5

For some reason, I just have to change the build to 3.0 from 3.1. My other app is built using 3.1. Any reason why this change needed to occur for it to work?

I tried that but didn’t work.
It linked properly after I enabled stripping in Unity (micro mscorlib).

the error you get there is due to too many static libraries present in the xcode project thats compiled.
so check which 3rd party libraries you have that either use more taxing .NET frameworks (System, System.Text and System.XML) or come with own static plugins (-> come with .a files)
This error is the reason why the non-pro unity iOS for a long time couldn’t touch system.xml at all, without having stripping it becomes a hit miss game

its a limitation in the iphone sdk, to overcome it the libraries either need to shrink (different version of unity have slightly different sizes, and so does targeting armv6 or armv7), the ultimate way to do so is Unity iOS Pros stripping feature.

Thanks for the explanation :slight_smile: It has actually happened to be before as well, micro mscorlib tends to be a default for me…

Not always a good idea, I normally start out with no stripping and reduce it then cause the chance for 3rd party libraries or even ongui working fine goes towards 0 with microcorelib and even byte level stripping