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.

about error #41: expected an identifier

Other Parts Discussed in Thread: CCSTUDIO

Hi, I'm in Samsung network division.

I  try to build your DSP codes on linux system.

I copied source codes that is works well(build) on windows system.

When I run build command like below, error is occurred but I don't know why,

-----------------------------------------------------------------------------------------------------------------

linux command:

eclipse -noSplash -data "/home/ms0402kim/CCS_TEST" -application com.ti.ccstudio.apps.projectBuild -ccs.projects DL-SCH0 --ccs.autoImport

-----------------------------------------------------------------------------------------------------------------

error msg

"/home/ms0402kim/CCS_TEST/Source/DRV/DeviceInit.h", line 261: error #41: expected an identifier
"/home/ms0402kim/CCS_TEST/Source/DRV/DeviceInit.h", line 262: error #41: expected an identifier
"/home/ms0402kim/CCS_TEST/Source/DRV/DeviceInit.h", line 263: error #41: expected an identifier

-----------------------------------------------------------------------------------------------------------------

DeviceInit.h line 261

typedef enum
{
GPIO_0=0,
GPIO_1,
GPIO_2,
GPIO_3,

-----------------------------------------------------------------------------------------------------------------

would you please give me some advice?

I'd installed below tools to build in linux system. it is same with windows tool version.

-----------------------------------------------------------------------------------------------------------------

CCS5.0.3.00028

bios_mcsdk_02_00_09_21

ndk_2_20_04_26

ti_cgt_c6000_7.3.0

-----------------------------------------------------------------------------------------------------------------

  • I think you are trying to build a CCS project from the command line.  This command ...

    MYUNGSOO KIM said:
    eclipse -noSplash -data "/home/ms0402kim/CCS_TEST" -application com.ti.ccstudio.apps.projectBuild -ccs.projects DL-SCH0 --ccs.autoImport

    looks similar to the ones documented in this wiki article.  However, I am not familiar the last argument --ccs.autoImport.  I don't know if it has anything to do with your problem.  How did you learn about it?

    If you build the project from within CCS, does that work?

    Thanks and regards,

    -George

  • I don't see anything wrong with the tiny fragment of code you posted.  The actual problem is most likely in the code surrounding or just before that line.  Please create a compilable test case that demonstrates the problem.

  • @George Mock

    yes I refer that site(wiki article as you comment).

    I added "--ccs.autoImport" option for test, but it doesn't work without it too. it fails and has same fail error.

    I tried in linux consol configuration and when I run with CCS linux, it fails too. same error.

    Should I make new project for linux build? if so, is there a different project option between linux and windows?

    (now I'm using already made project files by someone, it works well in windows console build. I modified only toolchain path)

    thanks.

  • @by

    when I check my codes, it doesn't have syntax error.

    anyway I'll check again. thanks.

  • MYUNGSOO KIM said:

    Should I make new project for linux build? if so, is there a different project option between linux and windows?

    The project options should not differ between Linux and Windows. However, one thing to keep in mind when moving from Windows to Linux is that Linux is case sensitive, while Windows is not. So for things like #includes for header files and search paths, make sure that the name/path you are referencing in your code matches with the actual file name.

    If it is not a complicated project, it wouldn't hurt to try creating a new project under Linux.

    MYUNGSOO KIM said:

    I tried in linux consol configuration and when I run with CCS linux, it fails too. same error.

    Do you mean that building the project within CCS GUI in Linux also generates this error? Can you reproduce this with a simple cut down project with minimal dependencies?

  • @AartiGdfd2222252536464ojddkfjfjfjdkfjalsd ff65kdk@fjasdlkfj;asldk

    @AartiG

    I had case sensitive, path problem as you commented, so I fix that appropriately.

    this is only error that I can't fix now.

    "error #41: expected an identifier"

    I think,maybe, source codes doesn't have syntax error,

    does it have a possibility that occurred by incorrect configuration of compiler(or toolchain)??

    -----------------------------------------------------------------------------

    Do you mean that building the project within CCS GUI in Linux also generates this error?

    ------------------------------------------------------------------------------

    => yes. I tried within CCS GUI in linux.

         I can't understand exactly your last sentence, could you please give me more details?(how to that)

         " Can you reproduce this with a simple cut down project with minimal dependencies?"

    thanks.

  •  "Can you reproduce this with a simple cut down project with minimal dependencies?"

    What I meant by this is - are able to create a simple project that generates this compiler error at build time? You mentioned that you were using MCSDK, NDK etc but I was wondering if you could create a simple project without dependencies on those kits that still generates this error. If so, you can share the project with us and we might be able to identify the reason for the error. Without that information it is quite difficult to tell for sure the reason for the error.

    Just out of interest, could you copy and paste the output in the CCS build console to a text file and attach it here?

  • Hello!

    I had this problem too (#41 expected an identifier), and I just found how to fix it.

    The enum values were all #defined in an other library. I found this out by replacing a line of the enum with a #define, and the build shown a warning on this line, saying "Incompatible redefinition of macro XYZ" and the file/line where it was first #defined.

    I hope this will solve it for you too.