Error after creating main data files

I started adding basic data to my application. I created an object called Assets and defined its four attributes, and then created Asset.h and the Asset.m file for NSManagedObject. Now I get the following error, until before my application worked perfectly

Ld /Users/Omer/Library/Developer/Xcode/DerivedData/LoginTest-enoqygjnncuapjescysdafbighag/Build/Products/Debug-iphonesimulator/LoginTest.app/LoginTest normal i386 cd /Users/Omer/Desktop/Docs/LoginTest setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/Omer/Library/Developer/Xcode/DerivedData/LoginTest-enoqygjnncuapjescysdafbighag/Build/Products/Debug-iphonesimulator -L/Users/Omer/Desktop/Docs/LoginTest/ZBarSDK -F/Users/Omer/Library/Developer/Xcode/DerivedData/LoginTest-enoqygjnncuapjescysdafbighag/Build/Products/Debug-iphonesimulator -filelist /Users/Omer/Library/Developer/Xcode/DerivedData/LoginTest-enoqygjnncuapjescysdafbighag/Build/Intermediates/LoginTest.build/Debug-iphonesimulator/LoginTest.build/Objects-normal/i386/LoginTest.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -liconv -framework QuartzCore -framework CoreVideo -framework CoreMedia -framework AVFoundation -framework MapKit -framework CoreLocation -lz -framework CoreGraphics -framework MobileCoreServices -framework SystemConfiguration -framework CFNetwork -framework Foundation -framework UIKit -lzbar -o /Users/Omer/Library/Developer/Xcode/DerivedData/LoginTest-enoqygjnncuapjescysdafbighag/Build/Products/Debug-iphonesimulator/LoginTest.app/LoginTest Undefined symbols for architecture i386: "_OBJC_METACLASS_$_NSManagedObject", referenced from: _OBJC_METACLASS_$_Asset in Asset.o "_OBJC_CLASS_$_NSManagedObject", referenced from: _OBJC_CLASS_$_Asset in Asset.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) 
+4
source share
4 answers

Please enable coreData framework ...

+10
source

I myself would not create these classes. I recommend that you remove them and use the mogenerator to do this for you. This will create 4 classes for each object. it will be:

 _Assets.h _Assets.m Assets.h Assets.m 

Do not touch the _Assets.h and _Assets.m files, do everything you need in Assets.h and Assets.m.

Hope this helps

0
source

Add master data

You need to add a basic data structure as suggested by Ali3n.

How to add structure

If you do not know how to add a framework to your project, follow these steps:

  • In the project navigator, select your project
  • Choose a target
  • Select the Phase Assembly tab
  • Open the 'Link Binaries With Libraries' Extender
  • Click the "+" button
  • Choose a framework
  • (optional) Drag the added infrastructure to the Frameworks group

enter image description here

Link to the original post: How to add existing frameworks in Xcode 4?

0
source

I got a linker error because I only imported human files into my project and not machine files.

0
source

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


All Articles