Page 1 of 1

Text output problem when compiling

Posted: Tue Feb 28, 2012 5:45 am
by samo79
Today i found a very strange bug on shell, just when i finished to compile my small project i resize the shell output just to read better the entire output text, but i see this result

http://imageshack.us/photo/my-images/521/shella.png/

As you can see the text will be splitted in two block rathen then stay in a "unique" one, this happen just when i resize the window !
Also if i increase the window more the space between the two block of text will be increased aswell :shock:

This is the first time i note this strange problem, may be cause by the project i'm working ?

If so i can eventually provide the source i'm working on, let me know ..

Re: Shell bug when compiling (text output)

Posted: Tue Feb 28, 2012 12:43 pm
by Slayer
Not sure about the shell display but I was going to say isn't that compiling error simply because you are using a declaration (summoned by the commandline) from within the source you're compiling that conflicts with an inbuilt one? ;) Disable one of them!?

Re: Shell bug when compiling (text output)

Posted: Tue Feb 28, 2012 1:22 pm
by tonyw
gcc resorts to some funny tricks when printing long lines of text like compiler output.

I can't remember what control sequences it outputs, but IIRC it tries to place the cursor at the start of the first line (even though it may reach over many lines). Since the (old) console also tries to maintain the multi-row line as one entity, the result is sometimes less than ideal.

May I suggest that you include the options -Wall -Werror so that you are forced into fixing the warnings? Don't dismiss warnings as harmless!

Re: Text output problem when compiling

Posted: Wed Feb 29, 2012 3:28 pm
by xenic
samo79 wrote:This is the first time i note this strange problem, may be cause by the project i'm working ?
It's more likely that it's gcc output as tonyw has suggested. You can try redirecting the output to a file (make >>ram:output *>>ram:output) and check the file in a Hex reader to see if there is anything unusual about the output. I might add that I have some problems with compiler output to my KingCON console too. The lines are wrapped to fit in the console window when the output is printed to the window but when I use the scrollbar to see text that scrolled by, the lines are unwrapped and disappear off the edge of the console window if they are too long.