Remixed123
Remixed123

Reputation: 1585

Apple Mach-O Linker Error - ld: 1 duplicate symbol for architecture armv7

Getting the following compiler error when building an app in Xcode 4.6.3

Apple Mach-O Linker Error

ld: 1 duplicate symbol for architecture armv7

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

Upvotes: 1

Views: 1238

Answers (1)

Remixed123
Remixed123

Reputation: 1585

The reason was that I had used the same class wide variable in two different classes. Not sure why this is a problem, as they are not in my thinking global to the application, but just global to the class. The classes did not import to each other. Perhaps someone on here can provide a valid reason.

Here is some code to make it clearer.

ViewController1.m

@implementation ViewController1

int sliderSpeed = 500;

ViewController2.m

@implementation ViewController2

int sliderSpeed = 500;

Upvotes: 2

Related Questions