Undefined Symbols For Architecture I386 Macos

Undefined symbols for architecture i386: “OBJCCLASS$XXX”, referen ced from: objc-class-ref in XXX ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) 如果真机调试就是 undefined.

I teach a computer architecture course. I am trying to provide working Intel examples in both Mac OS and Microsoft Visual Studio environments. I am using Xcode 7.2, build 7C68. I am receiving the following message in the link step:


Undefined symbols for architecture


Undefined Symbols For Architecture I386 Macos Download

I have tried varying the build architecture between x86_64 and i386, as well as the default, with no effect. The main program and assembler function are trivial - I just need a working base. Here is the main program:


#include <iostream>

int AsmSub(int);

int main(int argc, const char * argv[]) {

int someVariable ; /

someVariable = -1;

std::cout << 'Calling AsmSubn';


Attn: Shlomi,HP Smart Scan still NOT a workaround for my model Printer/Scanner: HP Officejet Pro 8600 Plus e-All-in-One Printer - N911gHP Smart from the Mac App Store allows printing and scanning with SELECT HP printers: NOT OURS. WHICH?We do NOT have the HP scanner driver software we need for our HP product to scan.HP, WHERE IS THE DRIVER which should look something like??? Hp scan pro for macos catalina. Ours is NOT listed.//support.hp.com/us-en/drivers/selfservice/hp-' Officejet Pro 8600 Plus e-All-in-One Printer - N911g'Further, the following response is NOT a solution after trying Shlomi's advice here: Additionally, you may install HP Smart from the Mac App Store, which should allow printing and scanning with select HP printers.

someVariable = AsmSub(someVariable);


Undefined Symbols For Architecture I386 Macos

std::cout << 'Back From AsmSub, value:' << someVariable << 'n';

They charged me $65. Hi Jessica, I wonder if you ever solved your problem? Especially considering I just bought this MacBook Air in August and have always been a Windows user.Bart — did you figure out a solution? I had issues also, same thing, but thought it was my speakers so took them in. Dw1820a hackintosh bluetooth.

return 0;

}


Here is the assembler function being called, which just returns (I am assuming that EAX will contain both the single parameter and the result, but that is unrelated to this problem):


.global AsmSub

.text

.align 16

AsmSub:

ret

.data

.end


Here are the link step error messages:


Undefined symbols for architecture x86_64:

'AsmSub(int)', referenced from:

I386Undefined

_main in main.o

ld: symbol(s) not found for architecture x86_64

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

Undefined Symbols For Architecture I386 Macos X


Format my external hard drive. I am certain that this is probably a trivial oversight on my part, but I have not found anything like a useful answer with several searches. Any help will be truly appreciated. I have already used Google and Stack Overflow - hoping someone can run this on their own machine and see if it fails for them as well.


Best regards,


Undefined Symbols For Architecture I386 Macos Version

Hank Murphy