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.

How can I get rid of this warning?

I get this warning when I use CCS V4 tools with an external makefile

 WARNING: object file specified, but linking not enabled

Is there a way to get rid of this warning and not other warnings.  I compile a bunch of files and link them to form the DSP binary.

Thank you very much

Bharat

  • Bharat,

    This belongs in the Compiler forum. This thread will be moved there for better answers.

    You need to figure out what you are specifying that is causing the warning and change it. It most likely means that your command syntax for some command in your makefile is incorrect.

    Regards,
    RandyP

  • That warning means that you are passing an object file to the compiler, but you are not linking.

    Keep in mind that the TI compiler doesn't invoke the linker by default.  You must explicitly use the -z (--run_linker) option to invoke the linker.  This is different than many general-purpose compilers, where you could type the following and expect to get an executable file (a.out):

    gcc hello.o

    If you pass an object file to the compiler without invoking the linker, there is nothing for the compiler to do.  The compiler is worried that you might be expecting an executable, so it emits a warning to alert you that you might need to change your Makefile.

    You can fix this warning by never passing an object file to the compiler except during linking.

  • Note also that the common Unix idiom "cc file.c -o file.o" does not do what you might think with a TI compiler, because the options are different (as they are different among other compilers as well).  The -o option, without invoking the linker, does not mean "output file" but rather "invoke the optimiser."  The command "cl6x file.c -o file.o" therefore passes both file.c and file.o to the compiler without invoking the linker, and behaves as Mr Archaeologist describes.

  • That was the problem.  Thanks for pointing it out.  Appreciate your help.

    Bharat