Linux C Compilation

Source: Internet
Author: User

  1. GCC command

    Gcc-i/usr/local/mysql/include mysqlversion.c-o demo-l/usr/local/mysql/lib-lmysqlclient

    ?? -i /usr/local/mysql/include: take /usr/local/mysql/include as the first directory to look for header files, The search order is /usr/local/mysql/include,/usr/include,/usr/local/include

    -l /usr/local/mysql/lib  : means to put /USR/LOCAL/MYSQL/LIB  As the first directory to look for library files, the search order is: /USR/LOCAL/MYSQL/LIB  --/lib/usr/lib -/usr/local/lib Span style= "Color:rgb (255, 0, 0); line-height:22.5px; " >

    -lmysqlclient: To find the libmysqlclient dynamic library file in the above Lib path (if "static" is added to the GCC compilation selection to find the Libmysqlclient.a static library file) CD ? ?

Linux C Compilation

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.