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.

linking error on CCSv5.4 because of "-l" in library directory

Other Parts Discussed in Thread: AM1808

Hi all,

I upgraded my CCS to V5.4 from V5.2 yesterday, and it was working fine until today when I start to get linking error. The log of building was posted below, and it seems there is an "-l" as part of the directory of library "libc.a", thus the linker couldn't find the file. It happens to all the projects in the workspace.

Is there a way to remove the "-l" option?

Thanks,

Dawei


**** Build of configuration Debug for project GPIO ****

"D:\\ti\\ccsv5\\utils\\bin\\gmake" -k all
'Building target: GPIO.out'
'Invoking: ARM Linker'
"D:/ti/ccsv5/tools/compiler/arm_5.0.4/bin/armcl" -mv5e --code_state=32 --abi=eabi -me -g --define=am1808 --diag_warning=225 --display_error_number -z --stack_size=0x800 -m"GPIO.map" --heap_size=0x800 -i"D:/ti/ccsv5/tools/compiler/arm_5.0.4/lib" -i"D:/ti/ccsv5/tools/compiler/arm_5.0.4/include" --reread_libs --warn_sections --display_error_number --rom_model -o "GPIO.out" "./gpio_test.obj" "./boot.obj" -l"" -l"D:\ti\ccsv5\tools\compiler\arm_5.0.4\lib\libc.a" "../AM1808.cmd"
<Linking>
error #10008-D: cannot find file
"-lD:\ti\ccsv5\tools\compiler\arm_5.0.4\lib\libc.a"

undefined first referenced
symbol in file

--------- ----------------
>> Compilation failure
__TI_auto_init ./boot.obj
_args_main ./boot.obj
exit ./boot.obj
main_func_sp ./boot.obj

error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "GPIO.out" not built
gmake: *** [GPIO.out] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****

  • Hi Dawei,

    did you import the project or are you using the same workspace?  If so I would first make sure you use a fresh workspace and import the project.

    As we have seen an unfortunately bumpy road  with upgrades.  Would you be willing to try a fresh full v5.4 installation to a new directory?

    Best Regards,
    Lisa

  • Hi Lisa,

    I think I just found the problem. Yes I am using the same workspace. There is one BSL.lib in the base project in the workspace that all the projects need refer to. The linker is also looking for it so as to build the project, which was not shown on the screenshot above. However I mistakenly cleaned the entire workspace so that BSL.lib was removed but it was still specified in the "include" option. As the result, the linker sees one "-l" with null after it, followed by another "-l" and directory of "libc.a". That's why there is one additional "-l" attached to the input of the directory.

    By building the base project and generate BSL.lib, I am now getting away from that linking error any more.

    Thanks for the quick response though.

    Best,

    Dawei

  • Hi Dawei,

    ok, glad to hear and thanks for the update.

    All the best with development.

    Best Regards,
    Lisa