Libxml2: the debug mode can be compiled, but not the distribution mode?

Source: Internet
Author: User

 

Libxml2 is used in the project. ${sdkroot}/usr/include/libxml2 has been added to the header search path and compiled and run OK in debug mode, but cannot I switch to distribution mode?

The error is because the header file cannot be found:
Libxml/tree. h no such file or directory

There are 120 such errors.
The answer on the internet is that the path set by the header search path is incorrect.

But I set it clearly?

Last http://stackoverflow.com/questions/1140341/dylib-linked-in-debug-not-found-for-release-for-iphone-in-xcode reminded me:

An error on the. H is a compile-time error with your header search paths, not a. dylib or a linker error.
You have to ensure that/usr/include/libxml2 is in your header search paths in your release configuration.

The configuration in debug is set, but what about the configuration of distribution?

Hurry to view the configuration in distribution, but unfortunately, the header search path is set correctly.

Where is the problem? Suddenly, the number of error reports is only 120, which seems a bit wrong?

Delete the header search path and build it again. If you do not set the header search path, there are more than 8000 compilation errors!

What causes "partially valid" header search path?

There must be other configuration file header search path.

Since this project uses another static library (which also references the libxml2 library), is the distribution configuration of the static library correct?
Check the distribution configuration in the static library project. The problem is true:
Header search path is not set, and C/C ++ compiler version is not set to llvm gcc4.2.

Originally, Only debug configuration was set when debugging the static library. In this way, other projects that reference this static library will not be compiled in debug mode, because the debug configuration of the static library is correct. However, if other configurations such as release or distritution are used for compilation, the previous problem may occur because the release/distribution of the static library is not configured yet.

This lesson is profound and I hope it will help others.

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.