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.

CCS: where is the "../build/app_main.obj" folder generated from???

Other Parts Discussed in Thread: HALCOGEN, TMS570LS3137

Tool/software: Code Composer Studio

Hello, 

I'm writing a code and got the following error: 

error #10056: symbol "main" redefined: first defined in "../build/app_main.obj"; redefined in "./src/main.obj"

I'm not sure where the file app_main.obj generated from. I checked my main.c and there is only one main function, so I'm not sure where this conflict betweenapp_main.obj and main.obj in the symbol "main" is generated. 

  • What device are you on?  Is this an example project from one of our SDKs?

    Basically app_main.c and main.c both have main() functions in them which is not allowed.  Looking at the error message it looks like there is a "build" folder at the same level as your project root (since it shows ../build).  I think I have seen that app_main before from projects generated by halcogen.

    Regards,

    John

  • HY-TTC580. I'm trying to compile the template.

    There is no app_main.c file. I only have main.c under src. I'm thinking that since I have two build folders (one generated with the compiling process under Debug and the one provided with the template), this might have been causing the problem? Also, is there a relationship between the main.obj - [ARM/be] present in src inside the Debug folder and the app_main.obj in the build folder provided?
  • I am not familiar with HY-TTC580. I searched for it on ti.com, e2e.ti.com and well as google and didn't find anything related to ti. Is there a TI part # for the chip you are using.

    error #10056: symbol "main" redefined: first defined in "../build/app_main.obj"; redefined in "./src/main.obj"

    There are in no relationship between the main.obj and app_main.obj. The linker is attempting to link all of the object files into the executable but it is coming across a symbol (main) that was defined in a previous object file.

    There is some source file called app_main.c or app_main.cpp that is getting built by your project. If you search on your computer can you find it?

    Regards,
    John
  • The picture helps.

    I still don't know what HY-TTC580 is but I think I may know what the problem is.

    Do you know where the \Build folder came from? The contents of that folder are going to be included in the build. Inside that folder is the app_main.obj file. That folder looks like it is the output folder of a project as in there I see the .obj, .hex and .out files. Those files are generated by the build of a project. However here since that is not the output folder of this project they are being treated as inputs to your build.

    Regards,
    John
  • the part # is TMS570LS3137. No, I did not find the app_main.cpp or app_main.c
  • You are including the app_main.obj directly.  It is in the "build" folder that you are including in the project.  All of those files are included in the build.

    You probably want to remove this "Build" folder.  I would right click on the folder and exclude it from the build.