Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by q3er · Mar 19, 2014 at 06:10 AM · iospluginxcode

ios plugin Undefined symbols for architecture i386

Hi. i'm writing plugin for ios that geting device's location, download JSON from internet, and returning data back to unity.

I'm trying to test it on simulator (i have no ios device at the moment), but i'm geting the error.

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

I'm using Unity 4.3.4, xcode 5, simulator 6.1 and 7.0

I've wrote plugin in xcode, then draged .h and .m files in plugins/iOS in unity, in player settings in unity i set "simulator sdk", builded project and then changed RegisterMonoModules.cpp

 extern "C"
 {
     typedef void* gpointer;
     typedef int gboolean;
 #if !(TARGET_IPHONE_SIMULATOR)
     const char*            UnityIPhoneRuntimeVersion = "4.3.4f1";
     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_firstpass_info; // Assembly-CSharp-firstpass.dll
     extern gpointer*    mono_aot_module_Assembly_CSharp_info; // Assembly-CSharp.dll
     extern gpointer*    mono_aot_module_Assembly_UnityScript_firstpass_info; // Assembly-UnityScript-firstpass.dll
     extern gpointer*    mono_aot_module_Mono_Security_info; // Mono.Security.dll
     extern gpointer*    mono_aot_module_System_Core_info; // System.Core.dll
     extern gpointer*    mono_aot_module_System_Xml_info; // System.Xml.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                mono_dl_register_symbol (const char* name, void *addr);
     void    _setPrefs();
     void    _start();
     void    _sendWeather();
     void    _sendLocation();
     void    UnityNSObject_RetainObject();
     void    UnityNSObject_ReleaseObject();
     void    UnityNSError_Code();
     void    UnityNSError_Description();
     void    UnityNSError_Reason();
     void    UnityNSNotification_Name();
 }
 void RegisterMonoModules()
 {
     gEnableGyroscope = false;
 #if !(TARGET_IPHONE_SIMULATOR)
     mono_aot_only = true;
     mono_ficall_flag = false;
     mono_aot_register_module(mono_aot_module_Assembly_CSharp_firstpass_info);
     mono_aot_register_module(mono_aot_module_Assembly_CSharp_info);
     mono_aot_register_module(mono_aot_module_Assembly_UnityScript_firstpass_info);
     mono_aot_register_module(mono_aot_module_Mono_Security_info);
     mono_aot_register_module(mono_aot_module_System_Core_info);
     mono_aot_register_module(mono_aot_module_System_Xml_info);
     mono_aot_register_module(mono_aot_module_System_info);
     mono_aot_register_module(mono_aot_module_UnityEngine_info);
     mono_aot_register_module(mono_aot_module_mscorlib_info);
 
     mono_dl_register_symbol("_setPrefs", (void*)&_setPrefs);
     mono_dl_register_symbol("_start", (void*)&_start);
     mono_dl_register_symbol("_sendWeather", (void*)&_sendWeather);
     mono_dl_register_symbol("_sendLocation", (void*)&_sendLocation);
     mono_dl_register_symbol("UnityNSObject_RetainObject", (void*)&UnityNSObject_RetainObject);
     mono_dl_register_symbol("UnityNSObject_ReleaseObject", (void*)&UnityNSObject_ReleaseObject);
     mono_dl_register_symbol("UnityNSError_Code", (void*)&UnityNSError_Code);
     mono_dl_register_symbol("UnityNSError_Description", (void*)&UnityNSError_Description);
     mono_dl_register_symbol("UnityNSError_Reason", (void*)&UnityNSError_Reason);
     mono_dl_register_symbol("UnityNSNotification_Name", (void*)&UnityNSNotification_Name);
 #endif // !(TARGET_IPHONE_SIMULATOR)
     mono_dl_register_symbol("_setPrefs", (void*)&_setPrefs);
     mono_dl_register_symbol("_start", (void*)&_start);
     mono_dl_register_symbol("_sendWeather", (void*)&_sendWeather);
     mono_dl_register_symbol("_sendLocation", (void*)&_sendLocation);
 }
 


What i'm doing wrong? Any clues?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

20 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

iOS build is including Mac OSX .bundle files into Xcode Project 2 Answers

iOS - Disable ARC on XCode Projects 2 Answers

Call Unity class in XCode 1 Answer

Linker errors on Xcode 4.5.2 with OpenCV 2.4.3 2 Answers

Linker error when creating a static iOS library that depends on another static library. 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges