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.

Linker conflict between rts6700.lib and c67xfastMath.lib

Hello,

I have the following linker error and can't seem to get rid of it. I used to have similar errors on all of my math functions, but simply replacing the generic call with the fastmath specific xxxdp() call solved most of my issues. The problem with div is different. I don't use the div function... Does anyone know what I should do about this?

error: symbol "__divd" redefined: first defined in "C:/Program Files/Texas Instruments/ccsv4/tools/compiler/c6000/lib/rts6700.lib<divd.obj>"; redefined in "C:/Program Files/Texas Instruments/c67xmathlib_2_01_00_00/lib/c67xfastMath.lib<divdp.obj>"

Thanks

 

 

  • Insure that these things are true when you link:

    - The linker sees the library name c67xfastMath.lib before rts6700.lib
    - Use the linker option --priority.  Do not use --reread_libs (AKA -x).

    That should resolve it.  If not, then we need to investigate further.

    Thanks and regards,

    -George

  • You need use the "--priority" linker option to instruct the linker to prefer the symbols from c67xfastMath.lib. Also make sure you list c67xfastMath.lib first. Try the following linker options:

    cl6x <whatever> -z --priority --library=c67xfastMath.lib --library=rts6700.lib

  • I forgot to mention that I also use the dsp/bios. I moved things around as instructed, no change... Then I completely removed rts6700.lib from my link setup, no change... It seems like the dsp/bios is also including it for me automagically. So in this case is there a 'special' way to load in the extra math lib?

  • DSP/BIOS generates a linker command file which links rts6700.lib.  Do a search for "rts" in that file and you'll see it.  So make sure use the --priority option and also that fastmath appears on the command line before the generated linker command file.

  • OK, I've done that and it linked correctly. Sweet! However, If I tell my coworkers that this is the new build procedure, they will revolt.

    I need a more robust solution. The changes required to make this work get blown away everytime because the linker and dsp/bios files are autogenerated. Hand editing a file and calling the linker via the commandline is not something my coworkers will be able to accept. Isn't there a way to fix this via the ccsv4 ide? Is there a command I can stick in the *.tcf file that will bring the lib in correctly?

  • Solved.

    New Information from Brad has illuminated a section of the IDE that I wasn't aware of.

    Under the 'Project Properties', select CCS Build. Then choose the tab 'Link Order'. You will see a big blank listbox. Click the 'Add' button on the right and you will be presented with a list of everything that gets stuck into the autogenerated linker script. Check the offending items and add them. Sort as needed.