rsanchezsaez / CardboardSDK-iOS

iOS port of Google's CardboardSDK (mobile VR toolkit)
Other
334 stars 104 forks source link

Build error: __unity_getFrameParameters #5

Closed ashleydb closed 9 years ago

ashleydb commented 9 years ago

Hi, I'm trying to build this with Unity 5.0.1f1 and Xcode 6.3 for iPhone 5S on iOS 8.3. I followed your steps for setting up the project. Version A wouldn't work, (the Append option was greyed out,) so I went with option B and built to a new folder and added the resources you mention. However, I get a build error I can't resolve:

Undefined symbols for architecture armv7:
  "__unity_getFrameParameters", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I see _unity_getFrameParameters in CardboardUnity.cpp, so I'm not sure what the issue is. Any hints? Thanks Ash

rsanchezsaez commented 9 years ago

Did you follow step 4 on your Unity generated Xcode project? Make sure all the CardboardSDK .m and .mm sources files are part of your project target in Xcode.

screen-shot-2015-04-20-at-12 27 44

ashleydb commented 9 years ago

Yes sir. Here are screenshots of steps 4, 5 & 6.

FWIW, I only see the Target Membership setting on the CardboardSDK folder, not each file under it.

step4 step5 step6

ashleydb commented 9 years ago

Ah, I figured it out. Needed to select Group instead of Folder Reference in step 4. Thanks for the pointer.

step4

rsanchezsaez commented 9 years ago

Great! Cheers.

rsanchezsaez commented 9 years ago

If you happen to do any improvements on the Unity side, please feel free to contribute them back. Noticeably: we are missing magnetic trigger support from Unity right now. I think it shouldn't be too difficult to implement.

stefkeB commented 9 years ago

I had to replace all occurrences of ".x" ".y" and ".z" with ".v[0]" ".v[1]" and ".v[2]" respectively. It seems that the GLVector3 that was begin used, only generated the v array and not the xyz, rgb and others.