Xcode: Undefined Symbols for i386 Architecture

Honestly, I'm pretty inexperienced in OBJ-C. I was looking for a solution for other pages very strongly, but I still can not fix my problem. For my final project at school, I need to program an iOS application that should display data from a MySQL database. I checked the Codex article with Chris ( http://codewithchris.com/iphone-app-connect-to-mysql-database/#creatingphpservice ) and tried to change it for my specifications from school.

So here is my mistake:

Undefined symbols for architecture i386:
"_OBJC_CLASS_$_Data", referenced from:
objc-class-ref in HomeModel.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

As I already found out, this means that my HomeModel-File wants to access my "Data" class, which I defined in "Data.h". But I have already imported "Data.h" into my "HomeModel.m" (as well as into "HomeModel.h", although this is not necessary, I think).

Does anyone know how to fix this?

PS: I already checked the "Compile Sources" of my project.

+4
source share
2 answers

Thanks so much for your answers and comments!

As I mentioned, I'm really not an expert in Obj-C, and of course it was a mistake stupidity ...

My "Data.m" was completely empty.

I just had to add these few lines:

#import "Data.h"

@implementation Data
@end

: , "!

+2

, > " " " > " armv7 armv7s armv8 arm64 " , . , .

+3

Source: https://habr.com/ru/post/1623288/


All Articles