Problem with Multiple File Compilation Error:

This is a discussion on Problem with Multiple File Compilation Error: within the C Programming forums, part of the General Programming Boards category; dont concern the concept but problem is with c programming Actually i am working on a simulation which mimics the ...

  1. #1
    Registered User
    Join Date
    May 2011
    Posts
    14

    Problem with Multiple File Compilation Error:

    dont concern the concept but problem is with c programming

    Actually i am working on a simulation which mimics the subjective analysis of MOS(Mean Opinion Score) Evaluation

    My job is to compare the low bit rate codecs with ITU-T standard P.862

    So i downloaded the software from the site

    P.862..:..Revised Annex A Reference implementations and conformance testing for ITU-T Recs P.862, P.862.1 and P.862.2

    Code:
    $ cd Software/source
    $ gcc -o PESQ *.c
    it must work as
    Code:
    $ ./PESQ
    Perceptual Evaluation of Speech Quality (PESQ)
    Reference implementation for ITU-T Recommendations P.862, P.862.1 and P.862.2.
    Version 2.0 October 2005.
    
    <snip long unenlightening IP notice>
    
    Usage:
     PESQ HELP               Displays this text
     PESQ [options] ref deg
     Run model on reference ref and degraded deg
    
     Options: +8000 +16000 +swap +wb
      Sample rate - No default. Must select either +8000 or +16000.
      Swap byte order - machine native format by default. Select +swap for byteswap.
      Default mode of operation is P.862 (narrowband handset listening). Select +wb 
      to use P.862.2 wideband extension (headphone listening).
    
     File names may not begin with a + character.
    
     Files with names ending .wav or .WAV are assumed to have a 44-byte header, which is automatically skipped.  All other file types are assumed to have no header
    but it is giving me out error
    Code:
    /tmp/ccb7vwC7.o: In function `apply_VAD':
       pesqdsp.c:(.text+0x7be): undefined reference to `sqrtf'
       pesqdsp.c:(.text+0xe63): undefined reference to `logf'
       /tmp/ccb7vwC7.o: In function `time_align':
       pesqdsp.c:(.text+0x1263): undefined reference to `cos'
       pesqdsp.c:(.text+0x14d2): undefined reference to `pow'
       /tmp/ccb7vwC7.o: In function `split_align':
       pesqdsp.c:(.text+0x1894): undefined reference to `cos'
       pesqdsp.c:(.text+0x1da0): undefined reference to `pow'
       pesqdsp.c:(.text+0x218a): undefined reference to `pow'
       pesqdsp.c:(.text+0x2674): undefined reference to `pow'
       pesqdsp.c:(.text+0x2a41): undefined reference to `pow'
       /tmp/ccvZp6OI.o: In function `fix_power_level':
    pesqmain.c:(.text+0xbbc): undefined reference to `sqrt'
    /tmp/ccbSaDVw.o: In function `intensity_warping_of':
    pesqmod.c:(.text+0x11d2): undefined reference to `powf'
    pesqmod.c:(.text+0x1221): undefined reference to `pow'
    pesqmod.c:(.text+0x124b): undefined reference to `pow'
    /tmp/ccbSaDVw.o: In function `pseudo_Lp':
    pesqmod.c:(.text+0x12f8): undefined reference to `powf'
    pesqmod.c:(.text+0x1336): undefined reference to `pow'
    /tmp/ccbSaDVw.o: In function `multiply_with_asymmetry_factor':
    pesqmod.c:(.text+0x13b0): undefined reference to `powf'
    /tmp/ccbSaDVw.o: In function `compute_delay':
    pesqmod.c:(.text+0x153e): undefined reference to `sqrt'
    /tmp/ccbSaDVw.o: In function `Lpq_weight':
    pesqmod.c:(.text+0x18d4): undefined reference to `powf'
    pesqmod.c:(.text+0x1910): undefined reference to `pow'
    pesqmod.c:(.text+0x193b): undefined reference to `pow'
    pesqmod.c:(.text+0x1966): undefined reference to `powf'
    pesqmod.c:(.text+0x199b): undefined reference to `pow'
    /tmp/ccbSaDVw.o: In function `set_to_sine':
    pesqmod.c:(.text+0x19d9): undefined reference to `sinf'
    /tmp/ccbSaDVw.o: In function `pesq_psychoacoustic_model':
    pesqmod.c:(.text+0x1b38): undefined reference to `cos'
    pesqmod.c:(.text+0x2b0d): undefined reference to `floor'
    i thought the error is due to math.h as cos and sin and some other functions ,the program is absolutely failing to link them what actally must be done to get out from this problem,is my default library path is changed , i have not changed the package code at all

    can any one plz really help me out

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,344
    All those are math functions, so

    gcc -o PESQ *.c -lm

    That's 'minus LM' (all lowercase)

    > My job is to compare the low bit rate codecs with ITU-T standard P.862
    job as in "paid to do this"?
    Another graduate from the TurboC school, woefully under prepared for life in the modern world.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    May 2011
    Posts
    14

    Thanks Very Much

    Quote Originally Posted by Salem View Post
    All those are math functions, so

    gcc -o PESQ *.c -lm

    That's 'minus LM' (all lowercase)

    > My job is to compare the low bit rate codecs with ITU-T standard P.862
    job as in "paid to do this"?
    Another graduate from the TurboC school, woefully under prepared for life in the modern world.

    i belong to research i not much aware of this concepts of gcc and linux pretty new envi.

    do u have any idea,any envi variable is present to store the default path of libraries how to view that give a elaborate expln

  4. #4
    Registered User
    Join Date
    Jun 2005
    Posts
    5,879
    If you "belong to research" presumably you know how to find information, and read it in order to understand it. The ideas are the same regardless of whether you are searching for an article discussing quantum theory or (in this case) documentation for your compiler.

    If, as a researcher, you expect to treat the practical details of developing software as "beneath you", you can expect people who know the answers to be less than fully helpful.

    Documentation for gcc is easy to find using google, as is documentation for gcc that describes settings of relevant environment variables.
    Right 98% of the time, and don't care about the other 3%.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. facing problem with multiple source file porgram.
    By learning"c" in forum C Programming
    Replies: 10
    Last Post: 05-15-2011, 12:08 PM
  2. error: was not declared in this scope compilation error
    By i_r_tomash in forum C Programming
    Replies: 2
    Last Post: 05-27-2010, 07:44 AM
  3. Multiple file compilation error
    By MTK in forum C++ Programming
    Replies: 6
    Last Post: 12-01-2009, 08:41 PM
  4. ASCII File Copy Problem: Expand tabs to multiple spaces
    By matrixx333 in forum C Programming
    Replies: 5
    Last Post: 10-21-2009, 03:13 AM
  5. A problem with reading multiple lines from a file
    By edd1986 in forum C++ Programming
    Replies: 6
    Last Post: 03-19-2006, 12:26 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21