Shop OBEX P1 Docs P2 Docs Learn Events
Errors when compiling in the Raspberry — Parallax Forums

Errors when compiling in the Raspberry

Hi!

I was making a compilation in Raspberry, without I had done nothing, now it gives me this errors:
/home/pi/eFLL/examples/Fuzzy_Exp/Fuzzy_Exp.cpp:1:1: error: stray '\357' in program
/home/pi/eFLL/examples/Fuzzy_Exp/Fuzzy_Exp.cpp:1:1: error: stray '\273' in program
/home/pi/eFLL/examples/Fuzzy_Exp/Fuzzy_Exp.cpp:1:1: error: stray '\277' in program
/home/pi/eFLL/examples/Fuzzy_Exp/Fuzzy_Exp.cpp:1:1: error: stray '\357' in program
/home/pi/eFLL/examples/Fuzzy_Exp/Fuzzy_Exp.cpp:1:1: error: stray '\273' in program
/home/pi/eFLL/examples/Fuzzy_Exp/Fuzzy_Exp.cpp:1:1: error: stray '\277' in program
/home/pi/eFLL/examples/Fuzzy_Exp/Fuzzy_Exp.cpp:1:1: error: stray '\357' in program
/home/pi/eFLL/examples/Fuzzy_Exp/Fuzzy_Exp.cpp:1:1: error: stray '\273' in program
/home/pi/eFLL/examples/Fuzzy_Exp/Fuzzy_Exp.cpp:1:1: error: stray '\277' in program
/home/pi/eFLL/examples/Fuzzy_Exp/Fuzzy_Exp.cpp:1:1: error: stray '\357' in program
/home/pi/eFLL/examples/Fuzzy_Exp/Fuzzy_Exp.cpp:1:1: error: stray '\273' in program
/home/pi/eFLL/examples/Fuzzy_Exp/Fuzzy_Exp.cpp:1:1: error: stray '\277' in program
/home/pi/eFLL/examples/Fuzzy_Exp/Fuzzy_Exp.cpp:1:1: error: stray '#' in program
...
...

I already try install again to the last version of PropGCC:
cd /opt
sudo bash
wget http://david.zemon.name:8111/repository/download/PropGCC5_Gcc4rpi/.lastSuccessful/propellergcc-alpha_v1_9_0-gcc4-rpi.tar.gz?guest=1 -O propellergcc-alpha_v1_9_0-gcc4-rpi.tar.gz
mv parallax parallax.simpleide
tar -xf propellergcc-alpha_v1_9_0-gcc4-rpi.tar.gz
mv parallax parallax.gcc4
ln -s parallax.gcc4 parallax

Any advice to the best procedure to resolve this issue?

Thanks

Comments

  • In my Googling of those errors, it looks like there are characters in the file which the compiler does not recognize. Some common hits i found were using fancy quotes and the copyright symbol.
  • Sounds like a character encoding problem. "\357\273\277" interpreted as UTF-8 is $FEFF, which is a Byte Order Mark. Tell your text editor not to insert a Byte Order Mark.
  • ASAS Posts: 149
    Thanks for the sugestions!

    very strange... it was everything ok and with "no reason" it start doing this....
    is something with the compiler!! but I never change important files when I don´t know what I´m doing! :)

    I think I go format the SD is more easy :P
  • What programs did you use to view the file?
  • ASAS Posts: 149
    the simple txt "Text editor"
  • ElectrodudeElectrodude Posts: 1,657
    edited 2016-02-18 02:51
    That's just a generic name. What does your text editor say if you go to Help -> About?

    What distro are you using? Raspbian or what?

    (Who came up with freedesktop's confusing and useless generic names?!?)
  • Heater.Heater. Posts: 21,230
    You have been hit by the dreaded Unicode curse.

    Like the tower of Babel, unicode will be the downfall of our civilization.

    Anyway, you should not have to be making a new SD card. Just get your text editor to save the file in the right text encoding.
  • ASAS Posts: 149
    the text editor is Leafpad 0.8.18.1 in OS Raspbian.
    Thanks for the sugestions.
  • ASAS Posts: 149
    Solved:

    I open with SimpleIDE, delete the first characters with "nothing"
    it´s working :)
  • Excellent! Glad to hear it. Let us know if you run into this problem again. It'd be great to document here a good text editor for the Pi that doesn't give you or anyone else these kinds of headaches.
  • ASAS Posts: 149
    The SimpleIDE resolve the question, at this moment is my choice :P
    I already try the Code:Blocks, I like it but I think there are some issue with the Raspberry, or was I that don´t understand something.

    For the Raspberry what is your opinion?

    Thanks!
  • Heater.Heater. Posts: 21,230
    vim.

  • ASAS Posts: 149
    Thanks!

    And this work well with CMake?
  • Heater.Heater. Posts: 21,230
    I have never used cmake in my life, not even sure why we might need it, but as vim is just a text editor I'm sure it works very well with cmake.
  • ASAS Posts: 149
    thanks! I will test VIM for sure. :thumb:
  • Ha! Vim is great to know because it's available everywhere and it's powerful. Emacs would be its main competitor - there have been many a holy war fought over which is better. I use an IDE (like code::blocks) but it is neither free nor compatible with the Pi: JetBrains CLion. But is built to work with CMake. and it is greeeaaaaat :D
Sign In or Register to comment.