Text output problem when compiling

Have a question about our Software Developer Kit? Ask them here.
Post Reply
User avatar
Posts: 555
Joined: Fri Jun 17, 2011 11:13 pm
Location: Italy

Text output problem when compiling

Post 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


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 ..
User avatar
Beta Tester
Beta Tester
Posts: 851
Joined: Tue Dec 21, 2010 4:19 am
Location: New Zealand

Re: Shell bug when compiling (text output)

Post 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!?
~Yes I am a Kiwi, No, I did not appear as an extra in 'Lord of the Rings'~
1x AmigaOne X5000 2.0GHz 2gM RadeonR9280X AOS4.x
3x AmigaOne X1000 1.8GHz 2gM RadeonHD7970 AOS4.x
User avatar
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1445
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: Shell bug when compiling (text output)

Post 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!
Posts: 1165
Joined: Sun Jun 19, 2011 12:06 am

Re: Text output problem when compiling

Post 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.
AmigaOne X1000 with 2GB memory - OS4.1 FE
Post Reply