Compilation: Splint problems: Undefined reference to 'yywre'

Source: Internet
Author: User

To use the static code check tool splint, after downloading the tar package, compile and generate the following questions:

Csf-. O: In function 'input ':

/Home/wine/splint-3.1.2/src/cstrap. C: 2483: Undefined reference to 'yywrap'
Csung. O: In function 'yylex ':
/Home/wine/splint-3.1.2/src/cstrap. C: 2133: Undefined reference to 'yywrap'
Collect2: LD returned 1 exit status
Gmake [2]: *** [splint] Error 1
Gmake [2]: Leaving directory '/home/wine/splint-3.1.2/src'
Gmake [1]: *** [All-recursive] Error 1
Gmake [1]: Leaving directory '/home/wine/splint-100'

Make: *** [all] Error 2

Asked by David Evans [evans@cs.virginia.edu]

He replied:

The yywrap error is because of not having (or finding) bison/flex installed.

However, my system has obviously installed flex:

Find a feasible solution on the Internet and verify it as follows:

Solution: directly add the function yywrap in C6. the definition of yywrap is as follows:

Int yywrap ()

{

Return 1;

}

Post address: http://www.cppblog.com/ngaut/archive/2006/07/05/9450.html

Splint configuration reference:

Http://blog.csdn.net/wchinaw/article/details/6331131

Official splint Website:

Http://www.splint.org/documentation/

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.