"Go" C-link library compiles gcc compiler reference to sqrt undefined

Source: Internet
Author: User
at compile time also to add-lm after the instruction: gcc-o ABC Abc.c-lm

Cause: A library is missing and the library is joined with the-l parameter. Linux library naming is consistent, generally for libxxx.so, or LIBXXX.A, libxxx.la, to link a library with the-lxxx, remove the head lib and "." Behind So, LA, a and so on.

The common library link method is: Mathematics library-LM; POSIX thread-lpthread from: http://blog.csdn.net/ngcl_blog/article/details/17097531

"Go" C-link library compiles gcc compiler reference to sqrt undefined

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.