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 _main, referenced in rts2800_fpu32.lib

I am moving some 28335 projects from CC4 to CC5. I had to rebuild the project settings files as they did not import across properly, and I only have one error remaining: unresolved symbol _main, first referenced in C:\Software\Eco\rts2800_fpu32.lib<args_main.obj>.

This lib file is locally referenced (copied into the project directory), and of course main() exists. I tried playing with the linker-orders, which didn't help. This also looks like it could be an include-file problem, but I am including the 2 similar CC5 directories that I was in my CC4 project.

Does anyone know if a certain header file must be included or a certain path referenced?

  • HI,

    have a look at this wiki.  It could well be you are simply finding the wrong include area.  Please keep us informed.

    http://processors.wiki.ti.com/index.php/Include_paths_and_options

    Best Regards,

    Lisa

  • Lisa,

    I had seen that Wiki, and my Linker File Search Path looks just like that Wiki "Adding Libraries -- Proper Include" section. I agree, it must be an include-file, include-path, or linker-order issue, and I have tried many combinations. 

    This is a basic-C question, but I don't know the answer -- in what header file is main declared? That same header file would have to be included by the rts2800_fpu32.lib, and I don't have the source to that library. Do you know how the library references main (what header is included)?

  • Hi,

    hmm did you add the library file in the top dialogue box?  Could you send some screenshots?  When importing did you select "copy project into workspace"? Did you also add the directory to your include options?

    Best Regards,
    Lisa

  • There is no prototype for main in the library because there is more than one valid prototype for main.  The function main is handled as a special case by the compiler.  The library does not provide a definition of main; you must provide one as part of your program.  Is your main function provided in an assembly file?  If so, does it have a leading underscore?

  • My main function is in main.c (with no underscore).

    I have resolved this problem for now. Yours and Lisa's comments got me thinking this was some corruption in the CCS5 project settings. I had previously created the CCS5 project in the same directory tree as the CCS4 project -- because I need the source files to remain in the same directory for my SW configuration management. I just created a brand new project in a separate directory and I copied all of the source there, and it built without error. Once I get CCS5 completely working, I suspect I may have to delete all of the old CCS4 project files and use CCS5 only.

    Thanks.

  • Very glad to hear you managed to get it building and working.

    All the best with deveiopment and ... thanks Archeaologist ...

    Best Regards,
    Lisa