matusnovak / rpi-opengl-without-x

Raspberry Pi OpenGL ES 2 without an X server (using EGL)
The Unlicense
178 stars 32 forks source link

Compiling Error on RPI 3 #12

Closed Investegate closed 3 years ago

Investegate commented 3 years ago

Hey,

please help me with this fault :) I have done everything like in the description.

I get this error if i want to compile it on my RPI 3:

pi@raspberrypi:~ $ sudo gcc -c triangle.c -o triangle.o -I/opt/vc/include triangle.c:7:1: error: expected identifier or ‘(’ before ‘<’ token <!DOCTYPE html> ^ triangle.c:51:52: error: stray ‘\302’ in program

rpi-opengl-without-x/triangle.c at master ?? matusnovak/rpi-opengl-without-x · GitHub
                                                ^

triangle.c:51:53: error: stray ‘\267’ in program

rpi-opengl-without-x/triangle.c at master ?? matusnovak/rpi-opengl-without-x · GitHub
                                                 ^

triangle.c:51:87: error: stray ‘\302’ in program l-without-x/triangle.c at master · matusnovak/rpi-opengl-without-x ?? GitHub ^

triangle.c:51:88: error: stray ‘\267’ in program -without-x/triangle.c at master · matusnovak/rpi-opengl-without-x ?? GitHub ^

triangle.c:91:44: warning: unknown escape sequence: '\&'

triangle.c:91:44: warning: unknown escape sequence: '\&' triangle.c:91:44: warning: unknown escape sequence: '\&' triangle.c:91:44: warning: unknown escape sequence: '\&' triangle.c:91:44: warning: unknown escape sequence: '\&' triangle.c:91:44: warning: unknown escape sequence: '\&' triangle.c:91:44: warning: unknown escape sequence: '\&' triangle.c:91:44: warning: unknown escape sequence: '\&' triangle.c:91:44: warning: unknown escape sequence: '\&' triangle.c:91:44: warning: unknown escape sequence: '\&' triangle.c:91:44: warning: unknown escape sequence: '\&' triangle.c:91:44: warning: unknown escape sequence: '\&' triangle.c:91:44: warning: unknown escape sequence: '\&' triangle.c:91:44: warning: unknown escape sequence: '\&' triangle.c:91:44: warning: unknown escape sequence: '\&' triangle.c:91:44: warning: unknown escape sequence: '\&' triangle.c:91:44: warning: unknown escape sequence: '\&' triangle.c:91:44: warning: unknown escape sequence: '\&' triangle.c:169:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘<’ token ^ triangle.c:176:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘<’ token ^ triangle.c:202:275: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:204:251: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:205:262: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:206:268: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:207:264: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:208:264: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:209:271: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:210:285: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:211:272: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:215:323: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:216:339: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:239:307: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:244:299: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:245:316: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:246:305: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:247:327: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:248:340: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:253:279: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:254:317: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:255:334: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:256:340: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:257:349: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:277:270: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:280:333: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:281:343: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:285:343: error: expected identifier or ‘(’ before ‘<’ token link-symbol float-right text-normal color-text-tertiary pr-3">→ ^

triangle.c:303:10: warning: missing terminating ' character

^ triangle.c:2150:12: error: missing terminating ' character
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ triangle.c:2173:39: error: expected identifier or ‘(’ before numeric constant
  • © 2021 GitHub, Inc.
  • ^~~~ triangle.c:2207:12: error: stray ‘\342’ in program You can???t perform that action at this time. ^ triangle.c:2207:13: error: stray ‘\200’ in program You can???t perform that action at this time. ^ triangle.c:2207:14: error: stray ‘\231’ in program You can??t perform that action at this time.
    matusnovak commented 3 years ago

    Hi @Investegate

    I think you are trying to compile a html file. I assume you did wget https://github.com/matusnovak/rpi-opengl-without-x/blob/master/triangle.c and then run it through GCC? Try wget https://raw.githubusercontent.com/matusnovak/rpi-opengl-without-x/master/triangle.c instead.

    Investegate commented 3 years ago

    Hey @matusnovak

    Yes you think correctly! Thank you very much 💯