clang: error: linker command failed with exit code 1 (use -v to see invocation)

This happened to me simply because one function type did not match when 
called recursively. I know there are other types of faults that might cause it.
But this is what happened to me. 

Notice the Delete_Aux(t->left, item) recursive function calling.


TN *Delete_aux(TN *t, int item)
{

    // complete this function
    // write your code here
    TN *temp;
    if (t == NULL)
        return NULL;
    // if item is smaller go to the left node
    if (t->data > item)
    {
        t->left = Delete_Aux(t->left, item); //Should be Delete_aux(t->right, item); Delete_Aux(t->left, item) is shown int type 
        return t;
    }

    else if (t->data < item)
    {
        t->right = Delete_Aux(t->right, item); 
        return t;
    }
    else
    {

        if (t->left == NULL && t->right == NULL)
        {
            free(t);
            return NULL;
        }

        else if (t->left == NULL)
        {
            temp = t->right;
            free(t);
            return temp;
        }
        else if (t->right == NULL)
        {
            temp = t->left;
            free(t);
            return temp;
        }
        else
        {
            // get the smallest node in the right subtree temp = Leftmost(t->right)
            t->data = temp->data;
            t->right = Delete_Aux(t->right, temp->data);
            return t;
        }
    }
}

Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
clang: error: linker command failed with exit code 1 (use -v to see invocation) xcode linker command failed with exit code 1 (use -v to see invocation) clang clang: error: linker command failed with exit code 1120 (use -v to see invocation) linker command failed with exit code 1 (use -v to see invocation xcode clang: error: linker command failed with exit code 1 (use -v to see invocation) clang: linker command failed with exit code 1 (use -v to see invocation) Library not found for clang: error: linker command failed with exit code 1 (use to see invocation) clang: error: linker command failed with exit code 1 (use -v to see invocation) firebase g++ clang: error: linker command failed with exit code 1 (use -v to see invocation) Showing Recent Issues : Linker command failed with exit code 1 (use -v to see invocation) clang: error: linker command failed with exit code 1 (use -v to see invocation) c makefile error clang-10: error: linker command failed with exit code 1 (use -v to see invocation) clang: error: linker command failed with exit code 1 (use -v to see invocation) c++ in c clang: error: linker command failed with exit code 1 (use -v to see invocation) clang: error: linker command failed with exit code 1 (use -v to see invocation) in c clang: error: linker command failed with exit code 1 (use -v to see invocation linker command failed with exit code 1 (use -v to see invocation) iOS flutter clang: error: linker command failed with exit code 1 (use -v to see invocation) clang: error: linker command failed with exit code 1 (use -v to see invocation) rosetta clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [mysql2.bundle] Error 1 clang-7: error: linker command failed with exit code 1 (use -v to see invocation) : Linker command failed with exit code 1 (use -v to see invocation) clang++: error: linker command failed with exit code 1 (use -v to see invocation) clang: error: linker command failed with exit code 1 (use -v to see invocation) detox clang: error: linker command failed with exit code 1 (use -v to see invocation) linux linker command failed with exit code 1 (use -v to see invocation) error: linker command failed with exit code 1 (use -v to see invocation error: linker command failed with exit code 1 (use -v to see invocation) linker command failed with exit code 1 (use -v to see invocation) clang: error: linker command failed with exit code 1 (use -v to see invocation)
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source