This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

error problems urgent!

Hi!
I'm a newbie with using Keil C-51 Compiler! I want to compile a sourcecode and always recive Error 107 unbalanced #if-endif controls! I've looked to all statements and i can not find any mistakes!

There is another one!
Error 106 unclosed comment! In the compiler discribtion is written: it occurs if there is a '*/' missing, but i don't use comments like this /*--*/ only // comments! because if i am using this /*--*/ type the there is apearring another Error: like this error 141 in line ... near '/'

please could anybody help me or give me an advise which is probably wrong!
Thanks
DANIEL

Parents
  • Well!
    I am sure that the compiler supports '//'

    I've changed a couple of things for example i deleted all '*' in the comments
    and used '//' for '/*-*/' in all files!
    Moreover i set all #if to #ifdef
    Now there is no longer the error message #if-endif and unclosed comment!
    But instead of being free of errors i get about 50 more syntax errors!!! It is really frustrating!
    Ok! I had to life with the error messages, but i don't understand that the original source is compileable at the newest version, without any problems! Have they changed so many thing?

    Best regards
    DANIEL

Reply
  • Well!
    I am sure that the compiler supports '//'

    I've changed a couple of things for example i deleted all '*' in the comments
    and used '//' for '/*-*/' in all files!
    Moreover i set all #if to #ifdef
    Now there is no longer the error message #if-endif and unclosed comment!
    But instead of being free of errors i get about 50 more syntax errors!!! It is really frustrating!
    Ok! I had to life with the error messages, but i don't understand that the original source is compileable at the newest version, without any problems! Have they changed so many thing?

    Best regards
    DANIEL

Children