“Apple Mach-O linker command failed with exit code 1”

前端 未结 5 1539
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-16 02:53

I am trying to implement the SVProgressHUD activity indicator. I copied the classes to my project and added the following code to my appDelegate but can\'t figure out why i

相关标签:
5条回答
  • 2020-12-16 03:33

    It sounds like SVProgressHUD.m isn't enabled for your target. Click on it in the project navigator in the left-hand pane, then look in the file inspector in the right-hand pane to make sure there's a tick next to the target you are building.

    0 讨论(0)
  • 2020-12-16 03:37

    Edit

    The answer I provided (see My original answer) only fixes the problem, but it's not the correct solution. For correct solutions see Jim answer

    It sounds like SVProgressHUD.m isn't enabled for your target. Click on it in the project navigator in the left-hand pane, then look in the file inspector in the right-hand pane to make sure there's a tick next to the target you are building.

    or Parth Bhatt link.

    For the sake of completeness

    Experimenting a little bit, I found that when you drag and drop file or directory within your project, Xcode (4.3.1) asks you to select the right option to add those files or dir to your project. Make sure that that "Add to targets" option is checked.

    If you have missed to check that option, you need to following these steps:

    1. Select YourProjectName
    2. Select TARGETS
    3. Select Build Phases
    4. Add .m classes in Compile Sources section

    My original answer

    If you dragged those classes in your project, it could be the problem.

    To avoid that compiling error, use "Add Files to YourProjectName" instead.

    Suppose you have a directory that contains .h and .m files called "SVProgressHUD" in your desktop.

    Now you have to:

    1. Remove previous files (both .h and .m)
    2. Click with right click in your project
    3. Select "SVProgressHUD" dir with "Add Files to YourProjectName" (select the following check box options: Destination Copy items... and Folders Create groups for any...)

    Hope it helps.

    0 讨论(0)
  • 2020-12-16 03:38

    Checkout this link. Refer to accepted answer in this link:

    Undefined symbols for architecture i386: _OBJC_CLASS_$_SKPSMTPMessage", referenced from: error

    If it still doesnt help then refer to Allen Pike's answer in the above link. try removing and adding back QuartzCore framework in your app.

    Hope this helps you.

    0 讨论(0)
  • 2020-12-16 03:40
    1. check if you have any objects that you could previously delete without knowing it
    2. check if your all objects are connected , for example if you have a MapView but without a connection, it crashes down
    3. if this doesn't work, try with cleaning the app, or just restarting your iPhone and Xcode
    0 讨论(0)
  • 2020-12-16 03:42

    I resolved this issue by changing in Player Settings in the Unity Editor.

    menu path: PlayerSettings > OtherSettings > Scripting Backend change to IL2CPP from Mono2x.

    Second change was to change the Architecture to universal.

    0 讨论(0)
提交回复
热议问题