Ios development problems: compilation errors of adding libraries and copying other engineering files

Source: Internet
Author: User

First, add the database question:

Select Build Phases-> Link Binary With Libraries point + Add Library

 
 

 

Then command + shift + k to clear the garbage from the history debug

Copying other project files compilation errors:

 

[Cpp]
When copying a file to a project, if you do not check "Add to Target", the following error will be reported during running:
Undefined symbols for architecture i386:

"_ OBJC_CLASS _ $ _ SKPSMTPMessage", referenced from:
Objc-class-ref in ConfirmController. o

"_ KSKPSMTPPartContentTransferEncodingKey", referenced from:
-[ConfirmController sendEmail] in ConfirmController. o

"_ KSKPSMTPPartMessageKey", referenced from:
-[ConfirmController sendEmail] in ConfirmController. o

"_ KSKPSMTPPartContentTypeKey", referenced from:
-[ConfirmController sendEmail] in ConfirmController. o

Ld: symbol (s) not found for architecture i386


Solution:
Click solution first (on the left side of the list, click the solution icon)
Select target
Select the tab to Build Phases
Compile Source
If not, expand
Find the plus sign and click the plus sign to add the header file of the. m file required by the target.
(If there is only one file, add both the. h files)
This should be done.

When copying a file to a project, if you do not check "Add to Target", the following error will be reported during running:
Undefined symbols for architecture i386:
 
"_ OBJC_CLASS _ $ _ SKPSMTPMessage", referenced from:
Objc-class-ref in ConfirmController. o
 
"_ KSKPSMTPPartContentTransferEncodingKey", referenced from:
-[ConfirmController sendEmail] in ConfirmController. o
 
"_ KSKPSMTPPartMessageKey", referenced from:
-[ConfirmController sendEmail] in ConfirmController. o
 
"_ KSKPSMTPPartContentTypeKey", referenced from:
-[ConfirmController sendEmail] in ConfirmController. o
 
Ld: symbol (s) not found for architecture i386
 
 
Solution:
Click solution first (on the left side of the list, click the solution icon)
Select target
Select the tab to Build Phases
Compile Source
If not, expand
Find the plus sign and click the plus sign to add the header file of the. m file required by the target.
(If there is only one file, add both the. h files)
This should be done.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.