Re: gcc compile problem: error: stray \168 in program
Hi Dave and Tim 1. Output from od -tx1 test.c -BEGIN--- 000 23 69 6e 63 6c 75 64 65 20 3c 73 74 64 69 6f 2e 020 68 3e 0a 0a 69 6e 74 20 6d 61 69 6e 28 29 0a 20 040 7b 0a 70 72 69 6e 74 66 28 a8 54 65 73 74 20 74 060 68 69 73 a8 29 3b 0a 72 65 74 75 72 6e 28 30 29 100 3b 0a 20 7d 0a 105 -END--- 2. Output from od- tx1 -a test.c -BEGIN--- 000 23 69 6e 63 6c 75 64 65 20 3c 73 74 64 69 6f 2e # i n c l u d e sp s t d i o . 020 68 3e 0a 0a 69 6e 74 20 6d 61 69 6e 28 29 0a 20 h nl nl i n t sp m a i n ( ) nl sp 040 7b 0a 70 72 69 6e 74 66 28 a8 54 65 73 74 20 74 { nl p r i n t f ( ( T e s t sp t 060 68 69 73 a8 29 3b 0a 72 65 74 75 72 6e 28 30 29 h i s ( ) ; nl r e t u r n ( 0 ) 100 3b 0a 20 7d 0a ; nl sp } nl 105 -END--- Tim McDaniel-2 wrote: On Mon, 23 Feb 2009, Dave Korn dave.korn.cyg...@googlemail.com wrote: Nor do I, but let's see what's in that file: can you show us the output you get from running od -tx1 test.c on your testcase please, and tell us exactly what editor you used. I personally prefer od -tx1 -a test.c: it should add ASCII versions of each character, to make it faster to find particular positions. Also, type od -tx1 at a command line without any filename following it, type a quote mark, then press enter, then Ctrl+D, and show us what that says. Being ultra-precise: type od -tx1 at a command line, and then press enter. That will start the octal dump program. The quote mark (meaning ) and enter is the one line of input. -- Tim McDaniel, t...@panix.com -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -- View this message in context: http://www.nabble.com/gcc-compile-problem%3A-error%3A-stray-%5C168-in-program-tp22145156p22185314.html Sent from the Cygwin list mailing list archive at Nabble.com. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: gcc compile problem: error: stray \168 in program
Ok here are more clues and I think this should help you: 1. From the command prompt from windows, I tried this - od -tx1 ENTER - ENTER (Note: I have to type double quotes twice always and I get two double quotes. I use backspace to remove one every time. A single double quotes produces no output on the screen ) -CTRL-D -BEGIN 000 22 0a 002 -END 2.From xterm Now I cannot get to type the double quotes at all. Also within vi in xterm. From windows command prompt, the double quotes gets printed as explained in 1 above (have to type it twice to get 2 s , use backspace to delete one to finally get 1 , as explained above. ) I closed everything and launched xterm again and still I cant get to type the in xterm or vi within xterm. Hope these inputs help you CHeers CM Tim McDaniel-2 wrote: On Mon, 23 Feb 2009, Dave Korn dave.korn.cyg...@googlemail.com wrote: Nor do I, but let's see what's in that file: can you show us the output you get from running od -tx1 test.c on your testcase please, and tell us exactly what editor you used. I personally prefer od -tx1 -a test.c: it should add ASCII versions of each character, to make it faster to find particular positions. Also, type od -tx1 at a command line without any filename following it, type a quote mark, then press enter, then Ctrl+D, and show us what that says. Being ultra-precise: type od -tx1 at a command line, and then press enter. That will start the octal dump program. The quote mark (meaning ) and enter is the one line of input. -- Tim McDaniel, t...@panix.com -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -- View this message in context: http://www.nabble.com/gcc-compile-problem%3A-error%3A-stray-%5C168-in-program-tp22145156p22186369.html Sent from the Cygwin list mailing list archive at Nabble.com. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: gcc compile problem: error: stray \168 in program
Hi Don't use Microsoft Word to write C source files? The real question is, how :) No, not using Word !! did the file get to be that way in the first place? Do you have an unusual keyboard layout/mapping? I have a Sun Keyboard. And I did not do any keyboard mapping. Some logs when I start XWin below: - English-USA, INternational (20409) - type=4 - Model=pc105, - Layout=us_intl Did receive a warning while starting Xwin though The KKEYBOARD keymap compiler (xkbcomp) reports: Warning: Type ONE LEVEL has 1 levels, but RALT has 2 symbols Ignoring extra symbols - I dont know if this is related to this... Cheers grip -- View this message in context: http://www.nabble.com/gcc-compile-problem%3A-error%3A-stray-%5C168-in-program-tp22145156p22156979.html Sent from the Cygwin list mailing list archive at Nabble.com. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: gcc compile problem: error: stray \168 in program
Hi Don't use Microsoft Word to write C source files? The real question is, how :) No, not using Word !! did the file get to be that way in the first place? Do you have an unusual keyboard layout/mapping? I have a Sun Keyboard. And I did not do any keyboard mapping. Some logs when I start XWin below: - English-USA, INternational (20409) - type=4 - Model=pc105, - Layout=us_intl Did receive a warning while starting Xwin though The KKEYBOARD keymap compiler (xkbcomp) reports: Warning: Type ONE LEVEL has 1 levels, but RALT has 2 symbols Ignoring extra symbols - I dont know if this is related to this... Cheers grip -- View this message in context: http://www.nabble.com/gcc-compile-problem%3A-error%3A-stray-%5C168-in-program-tp22145156p22156988.html Sent from the Cygwin list mailing list archive at Nabble.com. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
gcc compile problem: error: stray \168 in program
Hi all I am having trouble with gcc and the simplest of programs in C. To test my gcc installation, I tried this program: Code: #include stdio.h int main() { printf(Test this) ; return(0); } followed by gcc test.c -o test. I get some strange errors which goes like: test.c: In function `main': test.c:5: error: stray '\168' in program test.c:5: error: `Test' undeclared (first use in this function) test.c:5: error: (Each undeclared identifier is reported only once test.c:5: error: for each function it appears in.) test.c:5: error: parse error before this test.c:5: error: stray '\168' in program Had this got something to do with unrecognised double quotes? Can someone provide some guidance on how to resolve this. Help much appreciated! -- View this message in context: http://www.nabble.com/gcc-compile-problem%3A-error%3A-stray-%5C168-in-program-tp22145156p22145156.html Sent from the Cygwin list mailing list archive at Nabble.com. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/