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.

Errors when compiling an huge C++ project.

HI,

I met the follwing errors when I was compiling a huge C++ project (170k lines) for C66x on CCS 6.1:

    #7 unrecognized token

    #171 expected a declaration

These errors were reported in the file "hough.cpp". I have tried removing all content of the file, and creating an new file, but the errors still reported.

By the way, how can I compile and link a very huge project, for example, 500k C or C++ code lines. My project also met an error about branch offset overflow, my compiler setting is:

-mv6600 --abi=eabi -g --include_path="C:/ti/ccsv6/tools/compiler/c6000_7.4.12/include" --display_error_number --diag_warning=225 --diag_wrap=off --mem_model:const=far --mem_model:data=far

and my linker setting is:

-mv6600 --abi=eabi -g --display_error_number --diag_warning=225 --diag_wrap=off --mem_model:const=far --mem_model:data=far -z -m"cppTest.map" -i"C:/ti/ccsv6/tools/compiler/c6000_7.4.12/lib" -i"C:/ti/ccsv6/tools/compiler/c6000_7.4.12/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="cppTest_linkInfo.xml" --rom_model --trampolines=on

Although no error or warning are reported now, but I think the overflow problem still be there. So, please tell me how to deal with such size C++ project.

BR,

-Rex

    1. You'll need to show us the line containing the code causing these errors. 
    2. Is there a non-ASCII character on that line?
    3. You said you created a "new file," but did you put the same content into it?
    4. Do you have any extremely large functions in that program? 
    5. Is the code machine-generated?
    6. Can you compile and link with optimization level -o0?