hi compile errors for newb

rageleai
2007-04-27
2013-03-12
  • rageleai
    rageleai
    2007-04-27

    test.c :
    ----------------

    #include <string.h> 

    char str1[10]; 

    void main(void) { 
      strcpy(str1, "testing"); 
    }

    ----------
    (dashes aren't in file)
    this produced the terminal's result, some sort of error:

    /Users/name/test.c:10:11: missing terminating ' character
    /Users/name/test.c:14:11: missing terminating ' character
    /Users/name/test.c:18:11: missing terminating ' character
    /Users/name/test.c:20:11: missing terminating ' character
    /Users/name/test.c:21:11: missing terminating ' character
    /Users/name/test.c:25:1: warning: no newline at end of file

    /Users/name/test.c:1: parse error: token -> '{' ; column 1

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

    previously, test.c looked like this:

    -------------
    char test;

    void main(void) {
        test=0;
    }
    ---------------

    i pressed return after the final "}" and like added tabs and stuff to try to fix errors but in general the error for this previous test.c file was:

    /Users/name/test.c:11:3: warning: no newline at end of file

    /Users/name/test.c:1: parse error: token -> '{' ; column 1
    ----

    ok, so if telling you all sdcc directories or something would help, i will