Undefined reference to XXXX

Source: Internet
Author: User
Tags gtk

Help compile a thing today, prompt undefined reference to XXXX. This error is a linker error, for a long while, the only thing more like a clue is the library's dependency order.

Later saw someone say the link option two times, such as GCC ' pkg-config--cflags--libs gtk+-2.0 libusb-1.0 ' xx.c-o xx ' pkg-config--cflags--lib s gtk+-2.0 libusb-1.0 ', incredibly on the Magic Pass.

think there is a reason, if the link order is really related, then this is symmetric, in case there is a dependence on the reverse order, it will increase the direction of dependence, to avoid problems.

Undefined reference to XXXX

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.