This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Unresolved symbol using 3rd party library in CCSv4

hello,

 

I have a project that has several third party libraries.  in the project properties, under C/C++ build->Tool settings->c6000 Linker -> File Search path i added the directory in my project folder where the libraries exist. (${workspace_loc:/Project Dir/Lib}).  ONE of my libraries does not seem to link in, but 2 other libraries from the same company link in just fine.  if it specifically add the library to the "Include library file or command file as input" section everything builds fine.  I have no idea what settings i could have possibly screwed up. Anybody have any ideas? here is the linker output from the build:

 

'Building target: CaptelModel8006748.out'

'Invoking: Linker'

"C:/Program Files/Texas Instruments/C6000 Code Generation Tools 6.1.16/bin/cl6x" -mv6740 -g --define=_DEBUG --define=NOTURBO --diag_warning=225 -z -m"CaptelModel8006748.map" --stack_size=0x00003000 --heap_size=0x00020000 --issue_remarks --warn_sections -i"C:/CCv4 Projects/CaptelModel800 6748/Lib" -i"C:/Program Files/Texas Instruments/C6000 Code Generation Tools 6.1.16/lib" -i"C:/Program Files/Texas Instruments/C6000 Code Generation Tools 6.1.16/include" -i"C:/Program Files/Texas Instruments/bios_5_41_07_24/packages/ti/rtdx/lib/c6000" -i"C:/Program Files/Texas Instruments/bios_5_41_07_24/packages/ti/bios/lib" --reread_libs --absolute_exe --rom_model -o "CaptelModel8006748.out" -l"./CaptelModel800_6748cfg.cmd" "../TI_3rd_Party.cmd" "./mesi_rxtx.obj" "./Windows.obj" "./V32Framer.obj" "./Uti_CID.obj" "./UVTProtocol.obj" "./Test.obj" "./Task.obj" "./SoftIsr.obj" "./SNVRam.obj" "./QVGADisplay.obj" "./PhoneBook.obj" "./Menu.obj" "./Main.obj" "./LCDisplay.obj" "./Idle.obj" "./HardIsr.obj" "./FlashMem.obj" "./DSPFunctions.obj" "./Conversation.obj" "./CodecAIC20K.obj" "./CaptelModel800_6748cfg_c.obj" "./CaptelModel800_6748cfg.obj" "./BoardInit.obj" "./6421_I2C.obj" -l"libc.a" "../Lib/Baudot_lib_64x.lib"

<Linking>

remark: automatic RTS selection: linking in "rts6740.lib" in place of index

 

undefined first referenced

symbol in file

--------- ----------------

_LEC_ADT_g168Init ./Main.obj

_LEC_ADT_g168echoCancel ./SoftIsr.obj

_LEC_ADT_g168postCancel ./SoftIsr.obj

 

error: unresolved symbols remain

error: errors encountered during linking; "CaptelModel8006748.out" not built

library "libc.a"

"./CaptelModel800_6748cfg.cmd", line 359: remark: object ".printf" is not

allocated, but is being placed as part of allocated object "GROUP_1"

 

>> Compilation failure

gmake: *** [CaptelModel8006748.out] Error 1

gmake: Target `all' not remade because of errors.

  • Which library is it that contains the definitions for those undefined symbols listed in the error? The libraries that need to be linked in the project should be specified either within the linker option "Include library file or command file as input", or directly added to the project. It will not be automatically picked up with just the include path specified alone. Are you saying that it is not getting linked in even when it is specified under "Include library file or command file as input" option?

  • well that is just confusing. 

    I have several libraries.  specifically from ADT.  this library is the G168 LEC (filename lec_adt_a.l64p), and it is in the project as far as i can tell.  in the project view i can see all the libraries that I have in the project.  the other 2 libraries for the project, the G729 from ADT library and the AGC from ADT library have no problems, link just fine and i don't have to do anything special for them.  for some reason the G186 LEC library from ADT will not link like the other ones. the only way i can get that to link is by adding the file specifically to "Include library file or command file as input" but the other libraries don't have that requirement to work. what makes this library different?

  • well i think i figured this particular issue out. 

    in my third party software cmd file i found that the lec library was the only one not refered to by name. by that i mean i had it declared as:

    LEC_ADT_Text : { 

    } > DDR

    when it should have been declared as

    LEC_ADT_Text : { -llec_adt_a.l64p(

    .text) } > DDR

    NOW, however, i get a warning that states:

    warning: no matching section

    I don't know exactly what it is refering to. what does this warning mean?

  • The warning is saying that there is no .text section in that library.

    You said that you get a succesful link when you add this library to the "Include library file or command file as input" option. I would suggest reviewing the link map file generated and see what sections are actually being linked in from this library. Maybe the code section in this library has a custom name and is not the default .text.