Make clean + make distclean (automake tool)

Source: Internet
Author: User
Tags automake

Add the. cpp file to makefile. am.

The format is as follows:

Bin_programs = Executable File Name

* ** _ Sources = all. cpp files to be compiled, separated by Spaces
Libs =-lpthread-L/usr/local/lib-lpcap-LZ // Add to database
Defs + =-dnormal
Defs + =-dpdebug // open the debugging information to define dpdebug
Primary des =-I ../include // import the upper-level include path
# Includes = $ (deps_cflags)

# Ldadd = $ (deps_libs)

 

 

02-12-12, 00: 47

When I compile esound today, I did not notice that it is dependent on audiofile, resulting in an error. After the audiofile is compiled, the following error occurs when the esound is re-compiled:
(CD. libs & Rm-F libesddsp. So & ln-s libesddsp. so.0.2.29 libesddsp. So)
Ar cru. libs/libesddsp. A esddsp. o
Ranlib. libs/libesddsp.
Creating libesddsp. La
(CD. libs & Rm-F libesddsp. La & ln-S ../libesddsp. La libesddsp. La)
Gcc-dhave_config_h-I. -I. -I. -dsysconfdir =/"/etc/"-dserverdir =/"/usr/bin/"-g-O2-C esdcat. c
/Bin/sh./libtool -- mode = link GCC-g-O2-O esdcat. O libesd. La
Gcc-g-O2-o. libs/esdcat. O./. libs/libesd. So
./. Libs/libesd. So: Undefined reference to 'afgetsampleformat'
./. Libs/libesd. So: Undefined reference to 'afreadframes'
./. Libs/libesd. So: Undefined reference to 'afgetchann'
./. Libs/libesd. So: Undefined reference to 'afclofile'
./. Libs/libesd. So: Undefined reference to 'afgetrate'
./. Libs/libesd. So: Undefined reference to 'afgetframecount'
./. Libs/libesd. So: Undefined reference to 'afopenfile'
./. Libs/libesd. So: Undefined reference to 'afgettrackbytes'
Collect2: LD returned 1 exit status
Make [2]: *** [esdcat] Error 1
Make [2]: Leaving directory '/usr/src/esound-0.2.29'
Make [1]: *** [All-recursive] Error 1
Make [1]: Leaving directory '/usr/src/esound-0.2.29'
Make: *** [All-recursive-am] Error 2
When I was helpless, I decided to delete this directory (I want to make clean) and re-decommission and compile it. It turned out to be successful! What is the "undefined reference?

Tram

02-12-12, 08:32

This is the case. After you install audiofile, esound does not know because its configure script has been run and makefile is generated.Make clean + make distcleanSometimes it doesn't work. The make clean and make distclean scripts provided by some packages cannot completely delete the generated code. The cleanest way is to decompress the code again. I think the kernel's make mrproper may be the most complete script and can delete all the generated items. Undefined reference is a lack of type definition, which is usually a small header file.

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.