Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8325255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:22:12+00:00 2026-06-09T00:22:12+00:00

I am getting Apple Mach-O Linker (Id) Error: ld: duplicate symbol _matrixIdentity in /BlahBlah/Corridor.o

  • 0

I am getting “Apple Mach-O Linker (Id) Error”:

ld: duplicate symbol _matrixIdentity in /BlahBlah/Corridor.o and /Blahblah/Drawable.o for architecture i386

The class “Corridor” is extending the class “Drawable” and “_matrixIdentity” is defined and implemented in a file “Utils.h”. Here are top lines from my header files:

Drawable.h

#import <Foundation/Foundation.h>
#import "Utils.h" 
@interface Drawable : NSObject
...

Corridor.h

#import <Foundation/Foundation.h>
#import "Drawable.h"
@interface Corridor : Drawable
...

I have already checked if there are any “.m” imports instead of “.h”, everything is correct. Any idea, what could cause this problem?

EDIT: posting code from “Utils.h”

#import <Foundation/Foundation.h>    
...
#pragma mark -
#pragma mark Definitions

typedef float mat4[16];

#pragma mark -
#pragma mark Functions
void matrixIdentity(mat4 m)

{
m[0] = m[5] = m[10] = m[15] = 1.0;
m[1] = m[2] = m[3] = m[4] = 0.0;
m[6] = m[7] = m[8] = m[9] = 0.0;
m[11] = m[12] = m[13] = m[14] = 0.0;
}
...

I am only referencing to “mat4” definition in my both classes’ methods. Also, “matrixIdentity” is just the first function in this file, may be the problem is not in implementation.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T00:22:13+00:00Added an answer on June 9, 2026 at 12:22 am

    C/C++/Objective-C diff with Java, C#, Ruby, Python…

    Divide files.

    header & mm

    Do not use #include (may include many times)

    Use #import… (include once)


    Utils.h

    #ifndef __utils_h__ // <<< avoid multiple #include
    #define __utils_h__ // <<< avoid multiple #include
    #import <Foundation/Foundation.h>    
    ...
    #pragma mark -
    #pragma mark Definitions
    
    typedef float mat4[16];
    
    #pragma mark -
    #pragma mark Functions
    extern void matrixIdentity(mat4 m);
    
    #endif // __utils_h__ <<< avoid multiple #include
    

    Utils.mm

    #import "Utils.h"
    
    void matrixIdentity(mat4 m)
    {
    m[0] = m[5] = m[10] = m[15] = 1.0;
    m[1] = m[2] = m[3] = m[4] = 0.0;
    m[6] = m[7] = m[8] = m[9] = 0.0;
    m[11] = m[12] = m[13] = m[14] = 0.0;
    }
    ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting these Apple Mach-O Linker errors and I don't know how to read
Getting this error: 2009-09-03 12:44:02.307 xcodebuild[307:10b] warning: compiler 'com.apple.compilers.llvm.clang.1_0.analyzer' is based on missing compiler
Randomly im getting the following error from xcodebuild (iOS 5.0 SDK - Apple LLVM
I am getting error in APNS implementation I used code from here http://www.easyapns.com/apple-delegate I
I'm getting this error message every 10 seconds. 2011-02-09 05.54.37 com.apple.launchd.peruser.501[153] (com.mysql.mysqld) Throttling respawn:
I'm getting 2 Mach-O Linker Errors in regards to the CloudApp API . I
I'm having trouble getting Apple to generate an APN SSL certificate for my app
I keep getting 21002 'java.lang.NullPointerException' errors from Apple when I try to test my
I am getting the error: object render has no method apply for the below
So I looked at the sample code by Apple for getting the users location.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.