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 Creating .lib instead of .out file?

Guru 15580 points

I have set the Poperties->CCSBuild->OutputType to Executable, but the Linker is creating a static .lib file instead of an .out file. What am I doing wrong?

 

  • Mike,

    Does the build console show it invoking the linker or archiver? Was this project initially created as a Static Library project and then changed to a Executable?

    I tried creating a project first as Static Library, then changed it to Executable, and noticed that it creates the executable with a .lib extension instead of .out. But it does invoke the linker correctly instead of the archiver. So it should be ok to just rename the .lib to .out, or go into Build Properties->C/C++ Build->Linker->Basic Options and change the name of output file to .out extension.

     

  • Aarti,

    "Was this project initially created as a Static Library project and then changed to a Executable? ".

    Yes. That is exactly what happened. After renaming the output file in the (Properties->Linker->Basic Options->Specify Output File name) from ".lib" to ".out" I was able to generate the proper output file format.

    rant\

    HOWEVER, I would have thought that setting the output file type in the GUI (CCS Build->Output File Type) would have taken care of this automatically for me, instead of having to dig through several layers of screens to find it. Also, the error message when attempting to debug the project was "invalid file format" which gave me no meaningful information on the actual problem. How about something like "It appears that you are attempting to start a debug session with a .lib file instead of a .out file. Try changing the output file format of your compile/link process to ".out").

    \rant

    MikeH

     

  • MikeH,

    I agree that CCS should have taken care of this when you changed the output file type to Executable. I submitted this issue in our defect tracking system, the reference # is SDSCM00037774. You can track the status using the SDOWP link in my signature.

  • Thanks Aarti.