[IOS]/developer/platforms/iphonesimulator. Platform/developer/usr/bin/g ++-4.2 failed with exit code 1

Source: Internet
Author: User

Using xcode to compile command/developer/platforms/iphonesimulator. Platform/developer/usr/bin/g ++-4.2 failed with exit code 1

I have been searching online for a long time to explain various reasons, but most of them refer to redefinition of variables or static variable names. If you cannot find a redefined location for this project, it is likely to be the same as my personal problem,

I personally summarized the reasons.

1. the header file of the defined global variables is included in multiple files, which is also my problem.

Solution:

You can use the getdocument function in MFC to obtain the corresponding pointer.

Threadpool* Getthreadpool (IntMaxthreads)

{

Static Threadpool* Threadpool =Null;

If(Threadpool =Null)

{

Threadpool = new threadpool (maxthreads );

Return Threadpool;

}

ReturnThreadpool;

}

2. Duplicate static variables

3. Duplicate global variables

Related Article

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.