I'm working on a Unity, iOS and Vuforia project. I have trouble when trying to build and run in Xcode. I get the following error,
Undefined symbols for architecture armv7:
"_SAVESCREENSHOT", referenced from:
RegisterMonoModules() in RegisterMonoModules.o
"_PLAYMOVIE", referenced from:
RegisterMonoModules() in RegisterMonoModules.o
"_BACKTOSHELL", 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 know where these functions are (in a TouchHandler.cs located in Scripts for my Unity project),
using UnityEngine;
using System.Collections;
public class TouchHandler : MonoBehaviour {
//Talk to ios
[System.Runtime.InteropServices.DllImport("__Internal")]
extern static public void BACKTOSHELL();
[System.Runtime.InteropServices.DllImport("__Internal")]
extern static public void SAVESCREENSHOT();
The third one is declared the same way. In RegisterMonoModules.ccp it looks like this,
#include "RegisterMonoModules.h"
extern bool gEnableGyroscope;
extern "C"
{
typedef void* gpointer;
typedef int gboolean;
#if !(TARGET_IPHONE_SIMULATOR)
const char* UnityIPhoneRuntimeVersion = "4.5.1f3";
void mono_dl_register_symbol (const char* name, void *addr);
extern int mono_ficall_flag;
void mono_aot_register_module(gpointer *aot_info);
extern gboolean mono_aot_only;
extern gpointer* mono_aot_module_Assembly_CSharp_info; // Assembly-CSharp.dll
extern gpointer* mono_aot_module_Mono_Security_info; // Mono.Security.dll
extern gpointer* mono_aot_module_Qualcomm_Vuforia_UnityExtensions_info; // Qualcomm.Vuforia.UnityExtensions.dll
extern gpointer* mono_aot_module_System_Core_info; // System.Core.dll
extern gpointer* mono_aot_module_System_info; // System.dll
extern gpointer* mono_aot_module_UnityEngine_info; // UnityEngine.dll
extern gpointer* mono_aot_module_mscorlib_info; // mscorlib.dll
#endif // !(TARGET_IPHONE_SIMULATOR)
void PLAYMOVIE();
void BACKTOSHELL();
void SAVESCREENSHOT();
...................
}
And so on... I'm running on Unity version 4.5.1, Xcode version 5.0.2 and Vuforia version 3.0.5.
They're all up to date and the latest version.
↧