Changeset 3681 for pjproject


Ignore:
Timestamp:
Jul 24, 2011 9:13:11 AM (13 years ago)
Author:
bennylp
Message:

Fixed #1337 re: link error with the PLC stuff if G.711 codec is disabled.

This basically is caused by the problem with library order in the Makefile. Since libpjmedia (which contains the PLC code) is specified first before the third party libs (which the codecs reside), the PLC didn't get picked up by the linker. It works if G.711 is enabled, because G.711 lives in libpjmedia.

The real problem is because there is a circular dependency between pjmedia and third party libraries. The real solution would be to break down third party libraries into individual lib and arrange the link order correctly. This would need a bit of work in the Makefile though.

For now, let's just hack pjmedia-test so that it links with the PLC if G.711 is disabled.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.x/pjmedia/src/test/test.c

    r3553 r3681  
    4444} 
    4545 
     46/* Force linking PLC stuff if G.711 is disabled. See: 
     47 *  https://trac.pjsip.org/repos/ticket/1337  
     48 */ 
     49#if PJMEDIA_HAS_G711_CODEC==0 
     50int dummy() 
     51{ 
     52    // Dummy 
     53    return (int) &pjmedia_plc_save; 
     54} 
     55#endif 
     56 
    4657int test_main(void) 
    4758{ 
Note: See TracChangeset for help on using the changeset viewer.